RequestStatusImpl implements RequestStatus { @Override public Set<Resource> getAssociatedResources() { return associatedResources; } RequestStatusImpl(Resource requestResource);  RequestStatusImpl(Resource requestResource, Set<Resource> associatedResources);  RequestStatusImpl(Resource requestResource, Set<Resource> associatedResources, RequestStatusMetaData requestStatusMetaData); @Override Set<Resource> getAssociatedResources(); @Override Resource getRequestResource(); @Override Status getStatus(); @Override RequestStatusMetaData getStatusMetadata();  }
@Test public void testGetAssociatedResources() throws Exception { RequestStatusImpl status = new RequestStatusImpl(null); Assert.assertEquals(Collections.emptySet(), status.getAssociatedResources()); Resource associatedResource = new ResourceImpl(Resource.Type.Service); Set<Resource> associatedResources = Collections.singleton(associatedResource); status = new RequestStatusImpl(null, associatedResources); Assert.assertEquals(associatedResources, status.getAssociatedResources()); }