### Question:
DefaultConverterRegistry implements ConverterRegistry { @Override public Converter getConverter(Class<?> valueType) { ConverterProvider provider = findProvider(valueType); if (provider == null) { return null; } return provider.createConverter(valueType); } DefaultConverterRegistry(); @SuppressWarnings("unchecked") static List<Class<?>> getSupertypes(Class<?> type); @Override Converter getConverter(Class<?> valueType); final void registerConverter(Converter converter); final void registerConverter(ConverterProvider provider);  }### Answer:
@Test public void testDefaultRegistry() throws Exception { assertNotNull(registry.getConverter(Boolean.class)); assertNotNull(registry.getConverter(BigDecimal.class)); assertNotNull(registry.getConverter(BigInteger.class)); assertNotNull(registry.getConverter(Date.class)); assertNotNull(registry.getConverter(Double.class)); assertNotNull(registry.getConverter(Float.class)); assertNotNull(registry.getConverter(InetAddress.class)); assertNotNull(registry.getConverter(Integer.class)); assertNotNull(registry.getConverter(String.class)); assertNotNull(registry.getConverter(UUID.class)); assertNotNull(registry.getConverter(Enum.class)); assertNotNull(registry.getConverter(ByteBuffer.class)); assertNotNull(registry.getConverter(byte[].class)); assertNotNull(registry.getConverter(Duration.class)); assertNotNull(registry.getConverter(Instant.class)); assertNotNull(registry.getConverter(LocalDate.class)); assertNotNull(registry.getConverter(LocalDateTime.class)); assertNotNull(registry.getConverter(LocalTime.class)); assertNotNull(registry.getConverter(OffsetDateTime.class)); assertNotNull(registry.getConverter(OffsetTime.class)); assertNotNull(registry.getConverter(Period.class)); assertNotNull(registry.getConverter(Gender.class)); }
@Test public void testGetConverter() { assertNull(registry.getConverter((Class<?>) null)); assertNull(registry.getConverter(Connection.class)); assertNull(registry.getConverter(Connection.class)); }
@Test public void testGetConverterByGenericType() throws Exception { GenericType genericType1 = new GenericType(Fields.class, Fields.class.getField("field").getGenericType()); GenericType genericType2 = new GenericType(Fields.class, Fields.class.getField("connection").getGenericType()); assertNull(registry.getConverter((GenericType) null)); assertNotNull(registry.getConverter(genericType1)); assertNull(registry.getConverter(genericType2)); }
@Test public void testGetConverterForSubclass() { assertNotNull(registry.getConverter(Gender.class)); }