### Question:
RuntimeDelegateImpl extends RuntimeDelegate { public <T> T createInstance(Class<T> type) { if (type.isAssignableFrom(ResponseBuilder.class)) { return type.cast(new ResponseBuilderImpl()); } if (type.isAssignableFrom(UriBuilder.class)) { return type.cast(new UriBuilderImpl()); } if (type.isAssignableFrom(VariantListBuilder.class)) { return type.cast(new VariantListBuilderImpl()); } return null; } RuntimeDelegateImpl(); T createInstance(Class<T> type); @SuppressWarnings("unchecked") @Override HeaderDelegate<T> createHeaderDelegate(Class<T> type); @Override ResponseBuilder createResponseBuilder(); @Override UriBuilder createUriBuilder(); @Override VariantListBuilder createVariantListBuilder(); @Override T createEndpoint(Application app, Class<T> endpointType); @Override Link.Builder createLinkBuilder();  }### Answer:
@Test public void testCreateInstance() throws Exception { assertSame(ResponseBuilderImpl.class, new RuntimeDelegateImpl(). createInstance(ResponseBuilder.class).getClass()); assertSame(UriBuilderImpl.class, new RuntimeDelegateImpl(). createInstance(UriBuilder.class).getClass()); assertSame(VariantListBuilderImpl.class, new RuntimeDelegateImpl(). createInstance(VariantListBuilder.class).getClass()); }