IdentityConverter extends OpenTypeConverter { @Override Object toNonNullOpenValue(Object value) { return value; } IdentityConverter(Type targetType, OpenType openType, Class openClass); @Override Object fromNonNullOpenValue(Object value);  }
@Test public void shouldBeMockable() throws Exception { IdentityConverter mockIdentityConverter = mock(IdentityConverter.class); Object value = new Object(); Object result = new Object(); when(mockIdentityConverter.toNonNullOpenValue(value)).thenReturn(result); assertThat(mockIdentityConverter.toNonNullOpenValue(value)).isSameAs(result); }