@Test
public void singleObjects() throws Exception {

    Type type = Converter.single(TestData.class);
    TestData fromJson = fromJson(type, "{\n"
          + "  \"str\": \"test\",\n"
          + "  \"val\": 42\n"
          + '}');
    assertThat(fromJson).isNotNull();
    assertThat(fromJson.str).isEqualTo("test");
    assertThat(fromJson.val).isEqualTo(42);
    String toJson = toJson(type, fromJson);
    assertThat(toJson).isEqualTo("{\"str\":\"test\",\"val\":42}");
}