### Question:
Util { public static String genGeneric(List<? extends TypeParamInfo> params) { StringBuilder sb = new StringBuilder(); if (params.size() > 0) { sb.append("<"); boolean firstParam = true; for (TypeParamInfo p : params) { if (!firstParam) { sb.append(", "); } sb.append(p.getName()); firstParam = false; } sb.append(">"); } return sb.toString(); } private  Util(); static boolean isOptionalModule(String name); static boolean isBlacklistedClass(String name); static List<?> jvmClasses(); static String genType(TypeInfo type); static String genType(TypeInfo type, boolean parameter); static String genGeneric(List<? extends TypeParamInfo> params); static boolean isImported(TypeInfo ref, Map<String, Object> session); static String getNPMScope(ModuleInfo module); static String includeFileIfPresent(String file); static void generateLicense(PrintWriter writer); static String cleanReserved(String value); static String getOverrideArgs(String type, String method); static String getOverrideReturn(String type, String method); static boolean isBlacklisted(String type, String method, Object params); static void generateDoc(PrintWriter writer, Doc doc, String margin); static void registerJvmClasses(); static void unregisterJvmClasses(); static CharSequence genType(String name);  }### Answer:
@Test public void genGenericInput0OutputNotNull() { final ArrayList params = new ArrayList(); final String actual = Util.genGeneric(params); Assert.assertEquals("", actual); }
@Test public void genGenericInput1OutputClassCastException() { final ArrayList params = new ArrayList(); params.add(0); thrown.expect(ClassCastException.class); Util.genGeneric(params); }
@Test public void genGenericInput1OutputNullPointerException() { final ArrayList params = new ArrayList(); params.add(null); thrown.expect(NullPointerException.class); Util.genGeneric(params); }