assertEquals(queryFilter, (queryFilter & indexFilter));
}
public void testFnvBloomFilterLong() {
long indexFilter, queryFilter;
BloomFilter<Long> filter = new FnvBloomFilterLong(2);
Element element = createElement(1, new String[] {"professional", "social", "network"});
indexFilter = filter.computeIndexFilter(element);
queryFilter = filter.computeQueryFilter(new String[]{"professional", "social", "network"});
assertEquals(queryFilter, (queryFilter & indexFilter));
queryFilter = filter.computeQueryFilter(new String[]{"social", "network"});
assertEquals(queryFilter, (queryFilter & indexFilter));
queryFilter = filter.computeQueryFilter(new String[]{"professional", "network"});
assertEquals(queryFilter, (queryFilter & indexFilter));
queryFilter = filter.computeQueryFilter(new String[]{"professional", "social"});
assertEquals(queryFilter, (queryFilter & indexFilter));
queryFilter = filter.computeQueryFilter(new String[]{"pro", "net"});
assertEquals(queryFilter, (queryFilter & indexFilter));
queryFilter = filter.computeQueryFilter(new String[]{"p", "n"});
assertEquals(queryFilter, (queryFilter & indexFilter));
}