### Question:
JerseyClient implements javax.ws.rs.client.Client, Initializable<JerseyClient> { @Override public void close() { if (closedFlag.compareAndSet(false, true)) { release(); } } protected  JerseyClient(); protected  JerseyClient(final Configuration config,
                           final SSLContext sslContext,
                           final HostnameVerifier verifier); protected  JerseyClient(final Configuration config,
                           final SSLContext sslContext,
                           final HostnameVerifier verifier,
                           final DefaultSslContextProvider defaultSslContextProvider); protected  JerseyClient(final Configuration config,
                           final UnsafeValue<SSLContext, IllegalStateException> sslContextProvider,
                           final HostnameVerifier verifier); protected  JerseyClient(final Configuration config,
                           final UnsafeValue<SSLContext, IllegalStateException> sslContextProvider,
                           final HostnameVerifier verifier,
                           final DefaultSslContextProvider defaultSslContextProvider); @Override void close(); boolean isClosed(); boolean isDefaultSslContext(); @Override JerseyWebTarget target(final String uri); @Override JerseyWebTarget target(final URI uri); @Override JerseyWebTarget target(final UriBuilder uriBuilder); @Override JerseyWebTarget target(final Link link); @Override JerseyInvocation.Builder invocation(final Link link); @Override JerseyClient register(final Class<?> providerClass); @Override JerseyClient register(final Object provider); @Override JerseyClient register(final Class<?> providerClass, final int bindingPriority); @Override JerseyClient register(final Class<?> providerClass, final Class<?>... contracts); @Override JerseyClient register(final Class<?> providerClass, final Map<Class<?>, Integer> contracts); @Override JerseyClient register(final Object provider, final int bindingPriority); @Override JerseyClient register(final Object provider, final Class<?>... contracts); @Override JerseyClient register(final Object provider, final Map<Class<?>, Integer> contracts); @Override JerseyClient property(final String name, final Object value); @Override ClientConfig getConfiguration(); @Override SSLContext getSslContext(); @Override HostnameVerifier getHostnameVerifier(); ExecutorService getExecutorService(); ScheduledExecutorService getScheduledExecutorService(); @Override JerseyClient preInitialize();  }### Answer:
@Test public void testClose() { client.close(); assertTrue(client.isClosed()); client.close(); try { client.getConfiguration(); fail("IllegalStateException expected if a method is called on a closed client instance."); } catch (IllegalStateException ex) { } try { client.target("http: fail("IllegalStateException expected if a method is called on a closed client instance."); } catch (IllegalStateException ex) { } }