### Question:
ClientImpl implements Client { @Override public Client register(Class<?> cls) { checkClosed(); return configImpl.register(cls); } ClientImpl(Configuration config,
                      TLSConfiguration secConfig); @Override void close(); @Override Builder invocation(Link link); @Override WebTarget target(UriBuilder builder); @Override WebTarget target(String address); @Override WebTarget target(Link link); @Override WebTarget target(URI uri); @Override HostnameVerifier getHostnameVerifier(); @Override SSLContext getSslContext(); @Override Configuration getConfiguration(); @Override Client property(String name, Object value); @Override Client register(Class<?> cls); @Override Client register(Object object); @Override Client register(Class<?> cls, int index); @Override Client register(Class<?> cls, Class<?>... contracts); @Override Client register(Class<?> cls, Map<Class<?>, Integer> map); @Override Client register(Object object, int index); @Override Client register(Object object, Class<?>... contracts); @Override Client register(Object object, Map<Class<?>, Integer> map);  }### Answer:
@Test public void testRegisterNullComponentClass() { TestHandler handler = new TestHandler(); LogUtils.getL7dLogger(ConfigurableImpl.class).addHandler(handler); ClientBuilder.newClient().register(MyInterceptor.class, (Class<?>[]) null); for (String message : handler.messages) { if (message.startsWith("WARN") && message.contains("Null, empty or invalid contracts specified")) { return; } } fail("did not log expected message"); }
@Test public void testRegisterNullComponentObject() { TestHandler handler = new TestHandler(); LogUtils.getL7dLogger(ConfigurableImpl.class).addHandler(handler); ClientBuilder.newClient().register(new MyInterceptor(), (Class<?>[]) null); for (String message : handler.messages) { if (message.startsWith("WARN") && message.contains("Null, empty or invalid contracts specified")) { return; } } fail("did not log expected message"); }