EnvironmentContainerImpl implements EnvironmentContainerHost { @Override public void setQuota( final ContainerQuota containerQuota ) throws PeerException { this.containerSize = containerQuota.getContainerSize(); getPeer().setQuota( this.getContainerId(), containerQuota ); environmentManager.update( this ); } protected  EnvironmentContainerImpl();  EnvironmentContainerImpl( final String initiatorPeerId, final String peerId,
                                     final ContainerHostInfoModel hostInfo, final String templateId, String domainName,
                                     ContainerQuota containerQuota, String resourceHostId ); void init(); @Override Quota getRawQuota(); @Override Integer getVlan(); @Override Integer getDomainPort(); void setDomainPort( final Integer domainPort ); void setEnvironmentManager( final EnvironmentManagerImpl environmentManager ); void setEnvironment( Environment environment ); @Override HostId getResourceHostId(); @Override boolean isLocal(); @Override EnvironmentId getEnvironmentId(); @Override String getEnvId(); @Override ContainerHostState getState(); @Override String getHostname(); @Override String getContainerName(); Environment destroy( boolean removeMetadataOnly ); void nullEnvironment(); @Override void start(); @Override void stop(); @Override Snapshots listSnapshots(); @Override void removeSnapshot( final String partition, final String label ); @Override void rollbackToSnapshot( final String partition, final String label, final boolean force ); @Override void addSnapshot( final String partition, final String label, final boolean stopContainer ); @Override Peer getPeer(); @Override Template getTemplate(); @Override String getTemplateName(); @Override String getTemplateId(); @Override EnvironmentContainerHost addTag( final String tag ); @Override EnvironmentContainerHost removeTag( final String tag ); @Override Set<String> getTags(); @Override String getPeerId(); @Override String getId(); EnvironmentContainerHost setHostname( final String hostname, boolean metadataOnly ); @Override CommandResult execute( final RequestBuilder requestBuilder ); CommandResult executeUnsafe( final RequestBuilder requestBuilder ); @Override CommandResult execute( final RequestBuilder requestBuilder, final CommandCallback callback ); @Override void executeAsync( final RequestBuilder requestBuilder, final CommandCallback callback ); @Override void executeAsync( final RequestBuilder requestBuilder ); @Override boolean isConnected(); @Override HostInterfaces getHostInterfaces(); @Override HostInterface getInterfaceByName( final String interfaceName ); @Override HostArchitecture getArch(); @Override ContainerQuota getQuota(); @Override void setQuota( final ContainerQuota containerQuota ); @Override ContainerSize getContainerSize(); @Override void setContainerSize( final ContainerSize size ); @Override String getInitiatorPeerId(); @Override String getOwnerId(); @Override SshKeys getAuthorizedKeys(); @Override boolean equals( final Object o ); @Override ContainerId getContainerId(); @Override int hashCode(); @Override String toString(); @Override int compareTo( final HostInfo o ); @Override String getLinkId(); @Override String getUniqueIdentifier(); @Override String getClassPath(); @Override String getContext(); @Override String getKeyId(); Environment getEnvironment(); @Override String getIp(); @Override long getCreationTimestamp();  }
@Test public void testSetQuota() throws Exception { environmentContainer.setQuota( QUOTA ); verify( peer ).setQuota( environmentContainer.getContainerId(), QUOTA ); }