ContainerCloneStep { protected EnvironmentContainerImpl buildContainerEntity( final String peerId, final CloneResponse cloneResponse ) { final HostInterfaces interfaces = new HostInterfaces(); interfaces.addHostInterface( new HostInterfaceModel( Common.DEFAULT_CONTAINER_INTERFACE, cloneResponse.getIp() ) ); final ContainerHostInfoModel infoModel = new ContainerHostInfoModel( cloneResponse.getContainerId(), cloneResponse.getHostname(), cloneResponse.getContainerName(), interfaces, cloneResponse.getTemplateArch(), ContainerHostState.RUNNING, environment.getId(), cloneResponse.getVlan() ); return new EnvironmentContainerImpl( localPeerId, peerId, infoModel, cloneResponse.getTemplateId(), defaultDomain, cloneResponse.getContainerQuota(), cloneResponse.getResourceHostId() ); } 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 testBuildContainerEntity() throws Exception { doReturn( TestHelper.TEMPLATE_ID ).when( cloneResponse ).getTemplateId(); doReturn( TestHelper.RH_ID ).when( cloneResponse ).getResourceHostId(); doReturn( TestHelper.CONTAINER_QUOTA ).when( cloneResponse ).getContainerQuota(); assertNotNull( step.buildContainerEntity( TestHelper.PEER_ID, cloneResponse ) ); }