### Question:
Functions { public static String toJsonBundle(Dataset<? extends Resource> dataset) { Bundle bundle = toBundle(dataset); return CONTEXT.newJsonParser().encodeResourceToString(bundle); }  static Dataset<String> toJson(Dataset<?> dataset, String resourceType); static Bundle toBundle(Dataset<? extends Resource> dataset); static String toJsonBundle(Dataset<? extends Resource> dataset); static String resourceToXml(Resource resource); static String resourceToJson(Resource resource);  }### Answer:
@Test public void bundleToJson() { String jsonBundle = Functions.toJsonBundle(conditions); Bundle bundle = (Bundle) CONTEXT.newJsonParser().parseResource(jsonBundle); Condition parsedCondition = (Condition) bundle.getEntryFirstRep().getResource(); Assert.assertEquals(condition.getId(), parsedCondition.getId()); }