CordaRPCJavaClientTest refactoring to align with enterprise repo. (#2299)

* Align CordaRPCJavaClientTest with Kotlin version of the test ((byte)0 instead of "1".getBytes())
* Refactoring to align with enterprise repo (exceptions).
This commit is contained in:
szymonsztuka 2017-12-28 14:56:27 +01:00 committed by GitHub
parent 5ce873a6e4
commit cb0b311077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
}
@Before
public void setUp() throws ExecutionException, InterruptedException {
public void setUp() throws Exception {
node = startNode(ALICE_NAME, 1, singletonList(rpcUser));
client = new CordaRPCClient(requireNonNull(node.getInternals().getConfiguration().getRpcAddress()));
}
@ -71,11 +71,11 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
}
@Test
public void testCashBalances() throws NoSuchFieldException, ExecutionException, InterruptedException {
public void testCashBalances() throws ExecutionException, InterruptedException {
login(rpcUser.getUsername(), rpcUser.getPassword());
FlowHandle<AbstractCashFlow.Result> flowHandle = rpcProxy.startFlowDynamic(CashIssueFlow.class,
DOLLARS(123), OpaqueBytes.of("1".getBytes()),
DOLLARS(123), OpaqueBytes.of((byte)0),
CoreTestUtils.chooseIdentity(node.getInfo()));
System.out.println("Started issuing cash, waiting on result");
flowHandle.getReturnValue().get();