@Test
public void testGenerateViewId() {

    final int requestCount = 100;
    Set<Integer> generatedIds = new HashSet<>();
    for (int i = 0; i < requestCount; i++) {
        int generatedId = ViewCompat.generateViewId();
        assertTrue(isViewIdGenerated(generatedId));
        generatedIds.add(generatedId);
    }
    assertThat(generatedIds.size(), equalTo(requestCount));
}