### Question:
UserReferenceConverter extends AbstractConverter<UserReference> { @Override protected UserReference convertToType(Type targetType, Object value) { if (value == null) { return null; } return this.userReferenceResolver.resolve(value.toString()); }    }### Answer:
@Test void convertToType() { UserReference userReference = () -> false; when(this.userReferenceResolver.resolve("space.userPage")).thenReturn(userReference); UserReference result = this.converter.convertToType(null, "space.userPage"); assertEquals(userReference, result); }
@Test void convertToTypeValueNull() { assertNull(this.converter.convertToType(null, null)); }