@Test
public void shouldEncodeValueusingTypeWhenTypeProvided() {

    // given
    StringType stringType = new StringType();
    // when
    String encoded = type.encode(new SimpleObject(), stringType, null);
    // then
    assertThat(encoded).isEqualTo("simpleObject");
}