ScriptHash extends NeoSerializable implements Comparable<ScriptHash> { public String toAddress() { return AddressUtils.scriptHashToAddress(this.scriptHash); } ScriptHash();  ScriptHash(byte[] scriptHash);  ScriptHash(String scriptHash); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); @Override int getSize(); @Override byte[] toArray(); String toString(); String toAddress(); static ScriptHash fromAddress(String address); static ScriptHash fromScript(byte[] script); static ScriptHash fromPublicKey(byte[] encodedPublicKey); static ScriptHash fromPublicKeys(List<byte[]> encodedPublicKeys, int signingThreshold); static ScriptHash fromScript(String script); @Override int compareTo(ScriptHash o); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void toAddress() { final String key = "02b0aa85eaf261b000947dd6a9753b91bfc7ab058951e2d838cf3ecdab81cc291d"; final String expectedAddress = "ARhJPYxmizqheBQA2dSQAHWfQQsbTSba2S"; ScriptHash sh = ScriptHash.fromPublicKey(Numeric.hexStringToByteArray(key)); assertThat(sh.toAddress(), is(expectedAddress)); }