@Test public void grscicollRecordTest() { String expected = "{\"id\":\"1\"," + "\"institutionKey\":\"cb0098db-6ff6-4a5d-ad29-51348d114e41\"," + "\"collectionKey\":\"5c692584-d517-48e8-93a8-a916ba131d9b\"" + "}"; Institution institution = Institution.newBuilder() .setCode("I1") .setKey("cb0098db-6ff6-4a5d-ad29-51348d114e41") .setName("Institution1") .build(); InstitutionMatch institutionMatch = InstitutionMatch.newBuilder() .setInstitution(institution) .setMatchType(MatchType.EXACT.name()) .build(); Collection collection = Collection.newBuilder() .setKey("5c692584-d517-48e8-93a8-a916ba131d9b") .setCode("C1") .setName("Collection1") .setInstitutionKey("cb0098db-6ff6-4a5d-ad29-51348d114e41") .build(); CollectionMatch collectionMatch = CollectionMatch.newBuilder().setCollection(collection).setMatchType("FUZZY").build(); GrscicollRecord record = GrscicollRecord.newBuilder() .setId("1") .setInstitutionMatch(institutionMatch) .setCollectionMatch(collectionMatch) .build(); String result = GbifJsonConverter.toStringPartialJson(record); Assert.assertEquals(expected, result); }
public static String toStringPartialJson(SpecificRecordBase... records) { return toPartialJson(records).toString(); }
GbifJsonConverter { public static String toStringPartialJson(SpecificRecordBase... records) { return toPartialJson(records).toString(); } }
GbifJsonConverter { public static String toStringPartialJson(SpecificRecordBase... records) { return toPartialJson(records).toString(); }  }
GbifJsonConverter { public static String toStringPartialJson(SpecificRecordBase... records) { return toPartialJson(records).toString(); }  static ObjectNode toJson(SpecificRecordBase... records); static ObjectNode toPartialJson(SpecificRecordBase... records); static String toStringJson(SpecificRecordBase... records); static String toStringPartialJson(SpecificRecordBase... records); ObjectNode toJson(); @Override String toString(); }
GbifJsonConverter { public static String toStringPartialJson(SpecificRecordBase... records) { return toPartialJson(records).toString(); }  static ObjectNode toJson(SpecificRecordBase... records); static ObjectNode toPartialJson(SpecificRecordBase... records); static String toStringJson(SpecificRecordBase... records); static String toStringPartialJson(SpecificRecordBase... records); ObjectNode toJson(); @Override String toString();  }