### Question:
Address implements UnresolvedAddress { public static Address createFromEncoded(String encodedAddress) { return Address.createFromRawAddress(fromEncodedToPlain(encodedAddress)); } Address(String prettyOrRaw, NetworkType networkType); static Address createFromRawAddress(String rawAddress); static Address createFromEncoded(String encodedAddress); static Address createFromPublicKey(String publicKey, NetworkType networkType); static boolean isValidPlainAddress(String plainAddress); static boolean isValidEncodedAddress(String encodedAddress); static Optional<String> validateEncodedAddress(String encodedAddress); static Optional<String> validatePlainAddress(String plainAddress); static Address generateRandom(NetworkType networkType); String plain(); NetworkType getNetworkType(); @Override String encoded(NetworkType networkType); String encoded(); String pretty(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void shouldCreateFromEncodedFailWhenInvalid() { Assertions.assertEquals( "invalid! could not be decoded. DecoderException: Illegal hexadecimal character i at index 0", Assertions.assertThrows( IllegalArgumentException.class, () -> Address.createFromEncoded("invalid!")) .getMessage()); }
@Test void createFromEncoded() { Address address2 = Address.createFromRawAddress("NAR3W7B4BCOZSZMFIZRYB3N5YGOUSWIYJCJ6HDA"); Address address1 = Address.createFromEncoded("6823BB7C3C089D996585466380EDBDC19D4959184893E38C"); assertEquals(address1.plain(), address2.plain()); }