ContainerCloneStep { protected boolean processResponse( final CreateEnvironmentContainersResponse responses, final String peerId ) { final Set<EnvironmentContainerImpl> containers = new HashSet<>(); for ( CloneResponse response : responses.getResponses() ) { EnvironmentContainerImpl c = buildContainerEntity( peerId, response ); containers.add( c ); containerQuotas.put( c.getId(), response.getContainerQuota() ); } if ( !responses.hasSucceeded() ) { LOGGER.warn( responses.getMessages().toString() ); } if ( !containers.isEmpty() ) { environment.addContainers( containers ); } return responses.hasSucceeded(); } ContainerCloneStep( final String defaultDomain, final Topology topology, final LocalEnvironment environment,
                               final PeerManager peerManager, final IdentityManager identityManager,
                               final TrackerOperation operationTracker ); Map<String, ContainerQuota> execute();  }
@Test public void testProcessResponse() throws Exception { doReturn( Sets.newHashSet( cloneResponse ) ).when( response ).getResponses(); doReturn( environmentContainer ).when( step ).buildContainerEntity( TestHelper.PEER_ID, cloneResponse ); step.processResponse( response, TestHelper.PEER_ID ); verify( step ).buildContainerEntity( TestHelper.PEER_ID, cloneResponse ); verify( ENVIRONMENT ).addContainers( anySet() ); }