@Test
public void testTryExecute() {

  when(contractOperation.deploy(any(Account.class), any(), anyLong(), any()))
      .thenReturn(contractTxHash);
  final ContractTxHash executedContractTxHash =
      ContractTxHash.of(BytesValue.of(randomUUID().toString().getBytes()));
  when(contractOperation.execute(any(Account.class), any(), anyLong(), any()))
      .thenReturn(executedContractTxHash);
  final long nonce = Math.abs(new Random().nextLong()) + 1;
  final AccountState accountState = new AccountState(AccountAddressGen.generate(), nonce, Aer.ZERO);
  when(accountOperation.getState(account)).thenReturn(accountState);
  // When
  final BuildDetails buildDetails = new BuildDetails();
  buildDetails.setResult(randomUUID().toString());
  final DeploymentResult result = contractService.deploy(buildDetails);
  result.setContractInterface(contractInterface);
  final ExecutionResult executionResult =
      contractService.tryExecute(contractTxHash.toString(), contractFunction.getName());
  // Then
  assertNotNull(executionResult.getContractTransactionHash());
  verify(contractOperation).execute(any(Account.class), any(), anyLong(), any());
}