variantAnnotation.setXrefs(xrefs);
va.setXrefs(xrefs);
@Test public void testExcludeAnnotationParts() { List<Variant> allVariants = query(new Query(), new QueryOptions(QueryOptions.SORT, true)).getResult(); queryResult = query(new Query(), new QueryOptions(QueryOptions.SORT, true).append(QueryOptions.EXCLUDE, VariantField.ANNOTATION_XREFS)); assertEquals(allVariants.size(), queryResult.getResult().size()); List<Variant> result = queryResult.getResult(); for (int i = 0; i < result.size(); i++) { Variant expectedVariant = allVariants.get(i); Variant variant = result.get(i); assertEquals(expectedVariant.toString(), variant.toString()); assertNotNull(expectedVariant.getAnnotation()); assertNotNull(variant.getAnnotation()); VariantAnnotation expectedAnnotation = expectedVariant.getAnnotation(); VariantAnnotation annotation = variant.getAnnotation(); expectedAnnotation.setXrefs(null); expectedAnnotation.setId(null); assertEquals("\n" + expectedAnnotation + "\n" + annotation, expectedAnnotation, annotation); } }