@Test
public void shouldDifferentiateBetweenIndexes()
{
ExactPredicate pred1 = exact( 1, "value" );
ExactPredicate pred2 = exact( 1, "value2" );
ExactPredicate pred3 = exact( 2, "value" );
ExactPredicate pred4 = exact( 2, "value2" );
List<Long> ids = Arrays.asList(
ResourceTypes.indexEntryResourceId( 1, array( pred1 ) ),
ResourceTypes.indexEntryResourceId( 1, array( pred2 ) ),
ResourceTypes.indexEntryResourceId( 1, array( pred3 ) ),
ResourceTypes.indexEntryResourceId( 1, array( pred4 ) ),
ResourceTypes.indexEntryResourceId( 2, array( pred1 ) ),
ResourceTypes.indexEntryResourceId( 1, array( pred1, pred2 ) ),
ResourceTypes.indexEntryResourceId( 1, array( pred1, pred2, pred3 ) ),
ResourceTypes.indexEntryResourceId( 2, array( pred1, pred2, pred3, pred4 ) ) );
Set<Long> uniqueIds = Iterables.asSet( ids );
assertThat( ids.size(), equalTo( uniqueIds.size() ) );
}