CookbookUtils { public static boolean isPrimitiveType(String type) { try { Primitive.fromAlias(type); return true; } catch (RuntimeException e) { return false; } }  static boolean isPrimitiveType(String type); static boolean isFlagType(String flag); static boolean isKnownType(Cookbook cookbook, String type); static boolean isEnumType(Cookbook cookbook, String name); static boolean enumHasValue(Cookbook cookbook, String enumName, String value); static boolean isPrimitiveType(Type type); static boolean isNonPrimitive(String type, Cookbook cookbook); static Set<String> getNonPrimitiveTypes(Ingredient ingredient, Cookbook cookbook); static String getBaseType(String type, Cookbook cookbook); static ParamType parseType(String type, Cookbook cookbook);  }
@Test public void testIsPrimitiveType_string() { assertTrue(CookbookUtils.isPrimitiveType("string")); }
@Test public void testIsPrimitiveType_boolean() { assertTrue(CookbookUtils.isPrimitiveType("boolean")); }
@Test public void testIsPrimitiveType_int() { assertTrue(CookbookUtils.isPrimitiveType("int")); }
@Test public void testIsPrimitiveType_float() { assertTrue(CookbookUtils.isPrimitiveType("float")); }
@Test public void testIsPrimitiveType_unknownType() { assertFalse(CookbookUtils.isPrimitiveType("foobar")); }