TypeToken { public Type getType() { return type; } TypeToken(); private  TypeToken(Class<?> classOfT); Type getType();  }
@Test public void testShouldReturnTypeWhenItIsGivenWhileObjectCreation() { TypeToken<Boolean> typeToken = new TypeToken<Boolean>() { }; Type type = typeToken.getType(); assertThat(type).isEqualTo(Boolean.class); }