@Test
public void testGenericBasePartiallySpecializedEndpoint() throws Exception {

  String apiConfigSource = g.generateConfig(
      RestfulResourceEndpointBase.PartiallySpecializedEndpoint.class).get("partialApi-v1.api");
  JsonNode root = objectMapper.readValue(apiConfigSource, JsonNode.class);
  JsonNode methods = root.path("methods");
  assertEquals(6, methods.size());
  JsonNode rootPartial = objectMapper.readValue(apiConfigSource, JsonNode.class);
  JsonNode methodsPartial = rootPartial.path("descriptor").path("methods");
  JsonNode rootFull = objectMapper.readValue(
      g.generateConfig(RestfulResourceEndpointBase.FullySpecializedEndpoint.class)
      .get("fullApi-v1.api"), JsonNode.class);
  JsonNode methodsFull = rootFull.path("descriptor").path("methods");
  String partialPrefix = RestfulResourceEndpointBase.PartiallySpecializedEndpoint.class.getName();
  String fullPrefix = RestfulResourceEndpointBase.FullySpecializedEndpoint.class.getName();
  // list
  JsonNode methodListPartial = methodsFull.path(partialPrefix + ".list");
  JsonNode methodListFull = methodsFull.path(fullPrefix + ".list");
  assertNotNull(methodListPartial);
  assertEquals(
      methodListPartial.path("request").asText(), methodListFull.path("request").asText());
  // misc
  JsonNode methodMiscPartial = methodsFull.path("GenericRestBasePartiallySpecialized.misc");
  JsonNode methodMiscFull = methodsFull.path("GenericRestBaseFullySpecialized.misc");
  assertEquals(
      methodMiscPartial.path("request").asText(), methodMiscFull.path("request").asText());
}