@Test(expected = RuntimeException.class)
public void testDeployInvalidContractAddress() throws Throwable {

    TransactionReceipt transactionReceipt = new TransactionReceipt();
    transactionReceipt.setTransactionHash(TRANSACTION_HASH);
    prepareTransaction(transactionReceipt);
    String encodedConstructor = FunctionEncoder.encodeConstructor(
            Arrays.<Type>asList(new Uint256(BigInteger.TEN)));
    try {
        TestContract.deployRemoteCall(
                TestContract.class, web3j, SampleKeys.CREDENTIALS,
                ManagedTransaction.GAS_PRICE, Contract.GAS_LIMIT,
                "0xcafed00d", encodedConstructor, BigInteger.ZERO).send();
    } catch (InterruptedException e) {
        throw e;
    } catch (ExecutionException e) {
        throw e.getCause();
    }
}