@Test
public void returnsKeyForVariant() throws Exception {

    Variant variant = VariantAnnotation.builder()
            .chromosome(1)
            .position(2345)
            .ref("A")
            .alt("T")
            .build();
    // AlleleKey has no genomeAssembly. This might have been a bit of an oversight, but with assembly-specific caches
    // created in version 10.1.1 its OK to use the AlleleKey as the cache key
    AlleleProto.AlleleKey expected = AlleleProto.AlleleKey.newBuilder()
            .setChr(1)
            .setPosition(2345)
            .setRef("A")
            .setAlt("T")
            .build();
    assertThat(instance.generate(new Object(), Object.class.getMethod("toString"), variant), equalTo(expected));
}