### Question:
MinMaxConstraint implements FieldConstraint, Serializable { @Override public boolean isValidForFieldType(Type fieldType) { return IntegerType.TYPE.equals(fieldType) || DoubleType.TYPE.equals(fieldType) || BigDecimalType.TYPE.equals(fieldType) || BigIntegerType.TYPE.equals(fieldType); } MinMaxConstraint(String type); @Override String getType(); @Override boolean isValidForFieldType(Type fieldType); Number getValue(); void setValue(Number value); static final String MIN; static final String MAX; }### Answer:
@Test public void testIsValidForFieldTypeInteger() { assertTrue(constraint.isValidForFieldType(IntegerType.TYPE)); }
@Test public void testIsValidForFieldTypeDouble() { assertTrue(constraint.isValidForFieldType(DoubleType.TYPE)); }
@Test public void testIsValidForFieldTypeBigDecimal() { assertTrue(constraint.isValidForFieldType(BigDecimalType.TYPE)); }
@Test public void testIisValidForFieldTypeBigInteger() { assertTrue(constraint.isValidForFieldType(BigIntegerType.TYPE)); }
@Test public void testIsNotValidForFieldType() { assertFalse(constraint.isValidForFieldType(StringType.TYPE)); }