### Question:
ApplicationConverter { public static Application withoutDeployments(Application application) { if(application != null) { Application applicationReturned = new Application(); applicationReturned.setDeployments(null); applicationReturned.setHref(application.getHref()); applicationReturned.setId(application.getId()); applicationReturned.setImages(application.getImages()); applicationReturned.setLinks(application.getLinks()); applicationReturned.setName(application.getName()); return applicationReturned; } else { return null; } }  static Application withoutDeployments(Application application);  }### Answer:
@Test public void applicationWithoutDeploymentsTest() { Application application = new Application(); application.setDeployments(new ArrayList<Deployment>()); application.setHref("href"); application.setId(22); List<Image> images = new ArrayList<Image>(); application.setImages(images); List<Link> links = new ArrayList<Link>(); application.setLinks(links); application.setName("name"); Application applicationReturned = ApplicationConverter.withoutDeployments(application); assertEquals("name", applicationReturned.getName()); assertEquals(null, applicationReturned.getDeployments()); assertEquals(images, applicationReturned.getImages()); assertEquals(22, applicationReturned.getId()); assertEquals("href", applicationReturned.getHref()); assertEquals(links, applicationReturned.getLinks()); applicationReturned = ApplicationConverter.withoutDeployments(null); assertEquals(null, applicationReturned); }