@Test
public void testEncryptContent() throws Exception
{

    doReturn( new ByteArrayInputStream( "OK".getBytes() ) ).when( cachedOutputStream ).getInputStream();
    doReturn( pgpPublicKey ).when( keyManager ).getRemoteHostPublicKey( anyString() );
    doReturn( "OK".getBytes() ).when( encryptionTool )
                               .encrypt( isA( byte[].class ), isA( PGPPublicKey.class ), eq( true ) );
    MessageContentUtil.encryptContent( securityManager, SRC, TARGET, message );
    verify( encryptionTool ).encrypt( isA( byte[].class ), eq( pgpPublicKey ), eq( true ) );
}