### Question:
LQModel implements Serializable { public static boolean validValue(Object attribute, boolean raiseException) { boolean isValid = ((attribute == null) || (attribute instanceof String) || (attribute instanceof Number) || (attribute instanceof Boolean) || (attribute instanceof Date)); if(!isValid) { LiquidTools.exceptionOrLog(raiseException, "Value (" + attribute + ") with unsupported type. Supported: (String, Number, Boolean, Date)"); } return isValid; }  static String newIdentifier(); static boolean validKey(String key, boolean raiseException); static boolean validValue(Object attribute, boolean raiseException); static HashMap<String, Object> sanitizeAttributes(Map<String, Object> attributes, boolean raiseException); void save(Context context, String path); static JSONObject retriveFromFile(Context context, String path); static List<Object> toList(JSONArray array, String[] excludedKeys); abstract JSONObject toJSON();  }### Answer:
@Test public void testInvalidAttributes() { for(Object o : invalidAttributes) { assertFalse("Should be a invalid attribute", LQModel.validValue(o, false)); try { assertFalse("Should be a invalid attribute", LQModel.validValue(o, true)); fail("Should throw exception because is a invalid attribute"); } catch (IllegalArgumentException e) { } } }
@Test public void testValidAttributes() { for(Object o : validAttributes) { assertTrue("Should be a valid attribute", LQModel.validValue(o, false)); try { assertTrue("Should be a valid attribute", LQModel.validValue(o, true)); } catch (IllegalArgumentException e) { fail("Should not throw exception because is a valid attribute"); } } }