@@ -0,0 +1,1812 @@
+package org.hyperledger.indy.sdk.demo;%0A%0Aimport org.hyperledger.indy.sdk.IndyIntegrationTest;%0Aimport org.hyperledger.indy.sdk.agent.Agent;%0Aimport org.hyperledger.indy.sdk.agent.AgentResults;%0Aimport org.hyperledger.indy.sdk.crypto.Crypto;%0Aimport org.hyperledger.indy.sdk.wallet.Wallet;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class AgentDemoTest extends IndyIntegrationTest %7B%0A%0A%09@Test%0A%09public void testAgentDemo() throws Exception %7B%0A%09%09// 1. Create and open wallets for Alice and Bob%0A%09%09Wallet.createWallet(%22no pool%22, %22alice_wallet%22, null, null, null).get();%0A%09%09Wallet aliceWallet = Wallet.openWallet(%22alice_wallet%22, null, null).get();%0A%09%09Wallet.createWallet(%22no pool%22, %22bob_wallet%22, null, null, null).get();%0A%09%09Wallet bobWallet = Wallet.openWallet(%22bob_wallet%22, null, null).get();%0A%0A%09%09// 2. Create keys for Alice and Bob%0A%09%09String aliceKey = Crypto.createKey(aliceWallet, %22%7B%7D%22).get();%0A%09%09String bobKey = Crypto.createKey(bobWallet, %22%7B%7D%22).get();%0A%0A%09%09// 3. Prepare authenticated message from Alice to Bob%0A%09%09byte%5B%5D encryptedAuthMsg = Agent.prepMsg(aliceWallet, aliceKey, bobKey, MESSAGE).get();%0A%0A%09%09// 4. Parse authenticated message on Bob's side%0A%09%09%7B%0A%09%09%09AgentResults.ParseMsgResult decryptedAuth = Agent.parseMsg(bobWallet, bobKey, encryptedAuthMsg).get();%0A%09%09%09Assert.assertEquals(aliceKey, decryptedAuth.getSenderKey());%0A%09%09%09Assert.assertArrayEquals(MESSAGE, decryptedAuth.getMessage());%0A%09%09%7D%0A%0A%09%09// 5. Prepare anonymous message from Bob to Alice%0A%09%09byte%5B%5D encryptedAnonMsg = Agent.prepAnonymousMsg(aliceKey, MESSAGE).get();%0A%0A%09%09// 6. Parse anonymous message on Alice's side%0A%09%09%7B%0A%09%09%09AgentResults.ParseMsgResult decryptedAnon = Agent.parseMsg(aliceWallet, aliceKey, encryptedAnonMsg).get();%0A%09%09%09Assert.assertNull(decryptedAnon.getSenderKey());%0A%09%09%09Assert.assertArrayEquals(MESSAGE, decryptedAnon.getMessage());%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add Agent Demo for java wrapper.