@Test
public void testCreateSshKey() throws Exception
{

    doReturn( environmentContainer ).when( environment ).getContainerHostByHostname( TestHelper.HOSTNAME );
    doReturn( localPeer ).when( environmentContainer ).getPeer();
    SshKey sshKey = mock( SshKey.class );
    doReturn( sshKey ).when( localPeer )
                      .createSshKey( TestHelper.ENVIRONMENT_ID, TestHelper.CONT_HOST_ID, SshEncryptionType.ECDSA );
    environmentManager.createSshKey( TestHelper.ENV_ID, TestHelper.HOSTNAME, SshEncryptionType.ECDSA );
    verify( localPeer ).createSshKey( TestHelper.ENVIRONMENT_ID, TestHelper.CONT_HOST_ID, SshEncryptionType.ECDSA );
}