public Address getToAddress(Network network) throws ScriptException {
        return getToAddress(network, false);
    }
@Test(expected = ScriptException.class)
    public void getToAddressNoPubKey() {
        ScriptBuilder.createP2PKOutputScript(new ECKey()).getToAddress(BitcoinNetwork.TESTNET, false);
    }