InMemoryVariantWhiteList implements VariantWhiteList { @Override public boolean contains(Variant variant) { AlleleProto.AlleleKey alleleKey = AlleleProtoAdaptor.toAlleleKey(variant); return whiteList.contains(alleleKey); } private  InMemoryVariantWhiteList(Set<AlleleProto.AlleleKey> whiteList); static VariantWhiteList empty(); static VariantWhiteList of(Set<AlleleProto.AlleleKey> whiteList); @Override boolean contains(Variant variant); @Override String toString();  }
@Test void testContains() { Variant whiteListedVariant = VariantEvaluation.builder(1, 234567, "A", "G").build(); ImmutableSet<AlleleProto.AlleleKey> whitelistedKeys = ImmutableSet.of(AlleleProtoAdaptor.toAlleleKey(whiteListedVariant)); VariantWhiteList instance = InMemoryVariantWhiteList.of(whitelistedKeys); assertThat(instance.contains(whiteListedVariant), is(true)); VariantWhiteList emptyInstance = InMemoryVariantWhiteList.empty(); assertThat(emptyInstance.contains(whiteListedVariant), is(false)); }