### Question:
PropertyUtils { @SuppressWarnings("unchecked") public static <T> T transform(Class<T> type, String value) throws IllegalArgumentException { if (!VALUE_TRANSFORMER.containsKey(type)) { throw new IllegalArgumentException("unsupported parameter type: " + type); } return (T) VALUE_TRANSFORMER.get(type).apply(value); } private  PropertyUtils(); @SuppressWarnings("unchecked") static T transform(Class<T> type, String value); static void main(String[] args);  }### Answer:
@Test(dataProvider = "testTransformProvider") public void testTransform(Class<?> type, String val) { Object result = transform(type, val); assertTrue(type.isAssignableFrom(result.getClass())); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testUnsupportedTypeTransform() { transform(Map.class, ""); }