### Question:
JerseyClient implements javax.ws.rs.client.Client, Initializable<JerseyClient> { @Override public JerseyInvocation.Builder invocation(final Link link) { checkNotClosed(); checkNotNull(link, LocalizationMessages.CLIENT_INVOCATION_LINK_NULL()); final JerseyWebTarget t = new JerseyWebTarget(link, this); final String acceptType = link.getType(); return (acceptType != null) ? t.request(acceptType) : t.request(); } 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 testCreateLinkBasedInvocation() { final JerseyClient jerseyClient = new JerseyClient(); try { jerseyClient.invocation(null); fail("NullPointerException expected."); } catch (NullPointerException ex) { } try { jerseyClient.invocation(null); fail("NullPointerException expected."); } catch (NullPointerException ex) { } Link link1 = Link.fromUri(UriBuilder.fromPath("http: .build(); Link link2 = Link.fromUri(UriBuilder.fromPath("http: .type("text/plain") .build(); assertNotNull(jerseyClient.invocation(link1).buildPost(null)); assertNotNull(jerseyClient.invocation(link2).buildPost(null)); assertNotNull(jerseyClient.invocation(link1).buildPost(Entity.text("Test."))); assertNotNull(jerseyClient.invocation(link2).buildPost(Entity.text("Test."))); assertNotNull(jerseyClient.invocation(link1).buildPost(Entity.xml("Test."))); assertNotNull(jerseyClient.invocation(link2).buildPost(Entity.xml("Test."))); }