### Question:
ClientTypeHelper { public String getClientResourceType() { if (clientResourceType == null) { clientResourceType = ClientTypeHelper.extractClientType(getClientClass()); } return clientResourceType; } ClientTypeHelper(Class<? extends ToClientConverter> converterClass);  ClientTypeHelper(ToClientConverter<?, T, ?> converter); Class<T> getClientClass(); T getNewClientObjectInstance(); String getClientResourceType(); static String extractClientType(Class<?> clientObjectClass); static String extractClientType(MediaType mediaType); static String extractClientType(String mediaType);  }### Answer:
@Test public void getClientClass_clientTypeFromXmlRootAnnotation(){ final ClientTypeHelper<TestClientObjectWithXmlRootAnnotation> clientTypeHelper = new ClientTypeHelper<TestClientObjectWithXmlRootAnnotation>( new TestToClientConverterExtension<TestClientObjectWithXmlRootAnnotation>() {}); assertEquals(clientTypeHelper.getClientResourceType(), NAME_FROM_XML_ROOT_ELEMENT_ANNOTATION); }
@Test public void getClientClass_clientTypeFromXmlTypeAnnotation(){ final ClientTypeHelper<TestClientObjectWithXmlTypeAnnotation> clientTypeHelper = new ClientTypeHelper<TestClientObjectWithXmlTypeAnnotation>( new TestToClientConverterExtension<TestClientObjectWithXmlTypeAnnotation>() {}); assertEquals(clientTypeHelper.getClientResourceType(), NAME_FROM_XML_TYPE_ANNOTATION); }
@Test public void getClientClass_clientTypeFromClassName(){ final ClientTypeHelper<TestClientObjectWithoutAnnotation> clientTypeHelper = new ClientTypeHelper<TestClientObjectWithoutAnnotation>( new TestToClientConverterExtension<TestClientObjectWithoutAnnotation>() {}); assertEquals(clientTypeHelper.getClientResourceType(), "testClientObjectWithoutAnnotation"); }