MasteringController { @RequestMapping(value = "/defaultCollections/{entityType}", method = RequestMethod.GET) public JsonNode getDefaultCollection(@PathVariable String entityType) { return MasteringService .on(hubConfig.newStagingClient(null)) .getDefaultCollections(entityType); }  @RequestMapping(value = "/defaultCollections/{entityType}", method = RequestMethod.GET) JsonNode getDefaultCollection(@PathVariable String entityType);  }
@Test void verifyThatCorrectDatabaseClientIsUsed() { JsonNode node = controller.getDefaultCollection("Order"); ArrayNode array = (ArrayNode) node.get("onMerge"); assertEquals("sm-Order-mastered", array.get(0).asText(), "The unit test for the endpoint verifies all the collections; this test is here to ensure that a valid " + "DatabaseClient is used by the controller to connect to MarkLogic"); }