Typing { public final TypeMirror erasure(Class<?> type) { return types.erasure(elements.getTypeElement(type.getName()).asType()); } Typing(Elements elements, Types types); final TypeMirror type(Class<?> type); final TypeMirror erasure(Class<?> type); final TypeMirror specialize(Class<?> type, Class<?>... parameters); final TypeMirror specialize(Class<?> type, TypeMirror... parameters); final Elements elements; final Types types; }
@Test void erasure() { when(types.erasure(any(TypeMirror.class))).thenReturn(mirror); assertEquals(mirror, typing.erasure(int.class)); verify(types).erasure(type); }