### Question:
Address implements UnresolvedAddress { public static Address createFromRawAddress(String rawAddress) { Optional<String> validationError = validatePlainAddress(toPlainAddress(rawAddress)); Validate.isTrue(!validationError.isPresent(), validationError.orElse("")); return new Address(rawAddress, resolveNetworkType(rawAddress)); } 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 createFromRawAddressShouldFailWhenInvalidSize() { Assertions.assertEquals( "Plain address 'X' size is 1 when 39 is required", assertThrows( IllegalArgumentException.class, () -> { Address.createFromRawAddress("X"); }) .getMessage()); }
@Test void createFromRawAddressShouldFailWhenInvalidSuffix() { Assertions.assertEquals( "Plain address 'ADRDGFTDLLCB67D4HPGIMIHPNSRYRJRT7DOBGWA' checksum is incorrect. Address checksum is 'DC1358' when '61DABF' is expected", assertThrows( IllegalArgumentException.class, () -> { Address.createFromRawAddress("ADRDGF-TDLLCB-67D4HP-GIMIHP-NSRYRJ-RT7DOB-GWA"); }) .getMessage()); }
@Test void createFromRawAddressShouldFailWhenInvalidEnd() { Assertions.assertEquals( "Plain address 'ADRDGFTDLLCB67D4HPGIMIHPNSRYRJRT7DOBGWZ' doesn't end with A I, Q or Y", assertThrows( IllegalArgumentException.class, () -> { Address.createFromRawAddress("ADRDGF-TDLLCB-67D4HP-GIMIHP-NSRYRJ-RT7DOB-GWZ"); }) .getMessage()); }