RemoteServiceDescriptor { public Link getLink(String rel) throws ServerException, IOException { final Link link = getServiceDescriptor().getLink(rel); return link == null ? null : DtoFactory.getInstance().clone(link); } RemoteServiceDescriptor(String baseUrl, HttpJsonRequestFactory requestFactory); String getBaseUrl(); List<Link> getLinks(); Link getLink(String rel); ServiceDescriptor getServiceDescriptor(); boolean isAvailable();  }
@Test public void shouldReturnNullIfLinkWithRequiredRelDoesNotExist() throws Exception { remoteServiceDescriptor = new RemoteServiceDescriptor(serverUrl + SERVICE_PATH, requestFactory); assertNull(remoteServiceDescriptor.getLink("echo2")); }