use of org.springframework.core.serializer.support.DeserializingConverter in project spring-framework by spring-projects.
the class SerializationConverterTests method serializeAndDeserializeString.
@Test
public void serializeAndDeserializeString() {
SerializingConverter toBytes = new SerializingConverter();
byte[] bytes = toBytes.convert("Testing");
DeserializingConverter fromBytes = new DeserializingConverter();
assertEquals("Testing", fromBytes.convert(bytes));
}
use of org.springframework.core.serializer.support.DeserializingConverter in project spring-framework by spring-projects.
the class SerializationConverterTests method deserializationFailure.
@Test(expected = SerializationFailedException.class)
public void deserializationFailure() {
DeserializingConverter fromBytes = new DeserializingConverter();
fromBytes.convert("Junk".getBytes());
}
Aggregations