public static Object construct(Object something) throws Exception {
        if (something instanceof String) {
            return Class.forName((String)something).getConstructor().newInstance();
        } else if (something instanceof Map) {
            // keys are the class name, values are the parameters.
            for (Map.Entry<String, Object> entry : ((Map<String, Object>) something).entrySet()) {
                if (entry.getValue() instanceof Map) {
                    return constructByNamedParams(Class.forName(entry.getKey()), (Map)entry.getValue());
                } else if (entry.getValue() instanceof List) {
                    return constructByParameterizedConstructor(Class.forName(entry.getKey()), (List)entry.getValue());
                }
            }
        }
        return null;
    }
@Test(expected = Exception.class)
    public void classWithoutMatchedConstructor_constructed_failsWhenNoDefault() throws Exception {
        Map<String, List<Map<String, Object>>> constructMap = new HashMap<>();
        List<Map<String, Object>> params = new ArrayList<>();
        params.add(Collections.singletonMap("java.lang.String", "Hello"));
        constructMap.put("com.networknt.service.ClassWithoutDefaultConstructor", params);
        ServiceUtil.construct(constructMap);
    }