@Test void deserializeShouldThrowWhenNotBase64StringProvided() { assertThatExceptionOfType(SerializationException.class) .isThrownBy(() -> deserialize("abc")); }
public static <T extends Serializable> T deserialize(String object) { return Optional.ofNullable(object) .map(Base64.getDecoder()::decode) .<T>map(SerializationUtils::deserialize) .orElse(null); }
SerializationUtil { public static <T extends Serializable> T deserialize(String object) { return Optional.ofNullable(object) .map(Base64.getDecoder()::decode) .<T>map(SerializationUtils::deserialize) .orElse(null); } }
SerializationUtil { public static <T extends Serializable> T deserialize(String object) { return Optional.ofNullable(object) .map(Base64.getDecoder()::decode) .<T>map(SerializationUtils::deserialize) .orElse(null); }  }
SerializationUtil { public static <T extends Serializable> T deserialize(String object) { return Optional.ofNullable(object) .map(Base64.getDecoder()::decode) .<T>map(SerializationUtils::deserialize) .orElse(null); }  static String serialize(Serializable obj); static T deserialize(String object); }
SerializationUtil { public static <T extends Serializable> T deserialize(String object) { return Optional.ofNullable(object) .map(Base64.getDecoder()::decode) .<T>map(SerializationUtils::deserialize) .orElse(null); }  static String serialize(Serializable obj); static T deserialize(String object);  }