StringToArrayConverter implements StringToMultiValueConverter { public boolean accept(Class<String> type, Class<?> multiValueType) { if (multiValueType != null && multiValueType.isArray()) { return true; } return false; }  boolean accept(Class<String> type, Class<?> multiValueType); @Override Object convert(String[] segments, int size, Class<?> targetType, Class<?> elementType); @Override int getPriority();  }
@Test public void testAccept() { assertTrue(converter.accept(String.class, char[].class)); assertTrue(converter.accept(null, char[].class)); assertFalse(converter.accept(null, String.class)); assertFalse(converter.accept(null, String.class)); assertFalse(converter.accept(null, null)); }