@Test
public void testAnnotateCreateAndLoad() throws Exception {
DummyVariantDBAdaptor dbAdaptor = mockVariantDBAdaptor();
List<File> files = annotate(new Query(), new QueryOptions(VariantAnnotationManager.CREATE, true));
verify(dbAdaptor, atLeastOnce()).iterator(any(Query.class), any());
verify(dbAdaptor, never()).updateAnnotations(any(), anyLong(), any());
verify(dbAdaptor, never()).updateCustomAnnotations(any(), any(), any(), anyLong(), any());
assertEquals(1, files.size());
checkAnnotation(v -> false);
QueryOptions config = new QueryOptions(VariantAnnotationManager.LOAD_FILE, files.get(0).getId());
dbAdaptor = mockVariantDBAdaptor();
annotate(new Query(), config);
verify(dbAdaptor, atLeastOnce()).updateAnnotations(any(), anyLong(), any());
verify(dbAdaptor, never()).updateCustomAnnotations(any(), any(), any(), anyLong(), any());
verify(dbAdaptor, never()).iterator(any(Query.class), any());
checkAnnotation(v -> true);
}