TaxonomyResourceDefinition extends BaseResourceDefinition { @Override public String resolveHref(Map<String, Object> properties) { return String.format("v1/taxonomies/%s", properties.get("name")); } TaxonomyResourceDefinition(); @Override void validateCreatePayload(Request request); @Override String getTypeName(); @Override String getIdPropertyName(); @Override String resolveHref(Map<String, Object> properties);  }
@Test public void testResolveHref() { Map<String, Object> resourceProps = new HashMap<>(); resourceProps.put("id", "111-222-333"); resourceProps.put("name", "foo"); ResourceDefinition taxonomyDefinition = new TaxonomyResourceDefinition(); String href = taxonomyDefinition.resolveHref(resourceProps); assertEquals(href, "v1/taxonomies/foo"); }