@Test
public void dotest() throws Throwable {

	try {
		// Configure pipes
		configurePipe(encryptPipe, encryptParams);
		configurePipe(decryptPipe, decryptParams);
		// Encryption phase
		Message encryptMessage = new Message(MESSAGE);
		PipeRunResult encryptionResult = encryptPipe.doPipe(encryptMessage, session);
		// Make sure it's PGP message
		String mid = new String((byte[]) encryptionResult.getResult().asObject());
		assertMessage(mid, MESSAGE);
		// Decryption phase
		Message decryptMessage = Message.asMessage(encryptionResult.getResult());
		PipeRunResult decryptionResult = decryptPipe.doPipe(decryptMessage, session);
		byte[] result = (byte[]) decryptionResult.getResult().asObject();
		// Assert decrypted message equals to the original message
		Assert.assertEquals(MESSAGE, new String(result));
		Assert.assertEquals("success", expectation);
	} catch (Exception e) {
		if (checkExceptionClass(e, expectation)) {
			Assert.assertTrue(true);
		} else {
			throw e;
		}
	}
}