@Test
public void testDecrypt() throws UnsupportedEncodingException {

	
	/**
	 * 测试异常输入的情况，当加密的用户凭据为空的情况。
	 */
	Assert.assertNull(this.encryCredentialManager.decrypt(null));
	EncryCredential encryCredential = new EncryCredential(null);
	Assert.assertNull(this.encryCredentialManager.decrypt(encryCredential));
	encryCredential = new EncryCredential("");
	Assert.assertNull(this.encryCredentialManager.decrypt(encryCredential));
	
	
	/**
	 * 测试异常输入的情况，当加密的用户凭据不合法的情况。
	 */
	encryCredential = new EncryCredential("sdafdasfdsafdsa");
	try{
		this.encryCredentialManager.decrypt(encryCredential);
		Assert.fail("invalid encry credential ,should trhow an exception.");
	}
	catch (InvalidEncryCredentialException e) {
		
	}
}