### Question:
JerseyClientBuilder extends ClientBuilder { @Override public JerseyClientBuilder register(Class<?> componentClass) { this.config.register(componentClass); return this; } JerseyClientBuilder(); static JerseyClient createClient(); static JerseyClient createClient(Configuration configuration); @Override JerseyClientBuilder sslContext(SSLContext sslContext); @Override JerseyClientBuilder keyStore(KeyStore keyStore, char[] password); @Override JerseyClientBuilder trustStore(KeyStore trustStore); @Override JerseyClientBuilder hostnameVerifier(HostnameVerifier hostnameVerifier); @Override ClientBuilder executorService(ExecutorService executorService); @Override ClientBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService); @Override ClientBuilder connectTimeout(long timeout, TimeUnit unit); @Override ClientBuilder readTimeout(long timeout, TimeUnit unit); @Override JerseyClient build(); @Override ClientConfig getConfiguration(); @Override JerseyClientBuilder property(String name, Object value); @Override JerseyClientBuilder register(Class<?> componentClass); @Override JerseyClientBuilder register(Class<?> componentClass, int priority); @Override JerseyClientBuilder register(Class<?> componentClass, Class<?>... contracts); @Override JerseyClientBuilder register(Class<?> componentClass, Map<Class<?>, Integer> contracts); @Override JerseyClientBuilder register(Object component); @Override JerseyClientBuilder register(Object component, int priority); @Override JerseyClientBuilder register(Object component, Class<?>... contracts); @Override JerseyClientBuilder register(Object component, Map<Class<?>, Integer> contracts); @Override JerseyClientBuilder withConfig(Configuration config);  }### Answer:
@Test public void testRegisterIrrelevantContractsMap() { final ClientBuilder clientBuilder = ClientBuilder.newBuilder(); final Map<Class<?>, Integer> contracts = new HashMap<>(); contracts.put(Object.class, 500); contracts.put(String.class, 501); int sizeBeforeRegister = contracts.size(); clientBuilder.register(ClientConfigTest.MyProvider.class, contracts); int sizeAfterRegister = contracts.size(); assertThat(sizeBeforeRegister, equalTo(sizeAfterRegister)); }
@Test public void testRegisterNullMap() { final ClientBuilder clientBuilder = ClientBuilder.newBuilder(); final Map<Class<?>, Integer> contracts = null; clientBuilder.register(ClientConfigTest.MyProvider.class, contracts); assertNull(contracts); }
@Test(expected = Test.None.class) public void testRegisterIrrelevantImmutableContractsMap() { final ClientBuilder clientBuilder = ClientBuilder.newBuilder(); final Map<Class<?>, Integer> contracts = new HashMap<>(); contracts.put(Object.class, 500); contracts.put(String.class, 501); final Map<Class<?>, Integer> immutableContracts = Collections.unmodifiableMap(contracts); int sizeBeforeRegister = immutableContracts.size(); clientBuilder.register(ClientConfigTest.MyProvider.class, immutableContracts); int sizeAfterRegister = immutableContracts.size(); assertThat(sizeBeforeRegister, equalTo(sizeAfterRegister)); }