### Question:
TypeMarker { public Type getType() { return type; } protected  TypeMarker(); private  TypeMarker(Type type); static TypeMarker<Object> object(); static TypeMarker<Boolean> bool(); static TypeMarker<Integer> integer(); static TypeMarker<Long> longNumber(); static TypeMarker<String> string(); static TypeMarker<?> wrap(Type type); static TypeMarker<List<T>> listOf(Class<T> containedType); static TypeMarker<Set<T>> setOf(Class<T> containedType); static TypeMarker<Collection<T>> collectionOf(Class<T> containedType); static TypeMarker<Map<String, V>> mapOf(Class<V> valueType); static TypeMarker<Map<K, V>> mapOf(Class<K> keyType, Class<V> valueType); Type getType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testSimpleType() { TypeMarker<Integer> marker = new TypeMarker<Integer>() {}; assertEquals(Integer.class, marker.getType()); }
@Test public void testNestedType() { TypeMarker<List<String>> marker = new TypeMarker<List<String>>() {}; ParameterizedType type = (ParameterizedType) marker.getType(); assertEquals(List.class, type.getRawType()); assertEquals(1, type.getActualTypeArguments().length); assertEquals(String.class, type.getActualTypeArguments()[0]); }
@Test public void testDeeplyNestedType() { TypeMarker<Map<String, List<String>>> marker = new TypeMarker<Map<String, List<String>>>() {}; ParameterizedType type = (ParameterizedType) marker.getType(); assertEquals(Map.class, type.getRawType()); assertEquals(2, type.getActualTypeArguments().length); assertEquals(String.class, type.getActualTypeArguments()[0]); ParameterizedType valueType = (ParameterizedType) type.getActualTypeArguments()[1]; assertEquals(List.class, valueType.getRawType()); assertEquals(1, valueType.getActualTypeArguments().length); assertEquals(String.class, valueType.getActualTypeArguments()[0]); }