### Question:
NumberField implements FieldType<Number> { public int getPrecision() { return precision; } NumberField(final Types type);  NumberField(final Types type, final Number defaultValue);  NumberField(final Types type, final int precision);  NumberField(final int scale, final Types type);  NumberField(final Types type, final int precision, final Number defaultValue);  NumberField(final int scale, final Types type, final Number defaultValue);  NumberField(final Types type, final int precision, final int scale);  NumberField(final Types type, final int precision, final int scale, final Number defaultValue); @Override Types getType(); int getPrecision(); Integer getScale(); @Override Number getDefaultValue(); @Override boolean hasDefaultValue(); @Override Number convert(Object objValue); @Override JSONObject toJson();  }### Answer:
@Test public void testGetPrecision() throws OperationException { System.out.println("getPrecision"); for (Types type : Types.values()) { if (!isNumberType(type)) { continue; } assertEquals(getDefaultPrecision(type), new NumberField(type).getPrecision()); assertEquals(getDefaultPrecision(type), new NumberField(type, new Integer(0)).getPrecision()); if (typeTakesScale(type)) { assertEquals(getDefaultPrecision(type), new NumberField(2, type).getPrecision()); assertEquals(getDefaultPrecision(type), new NumberField(2, type, new Integer(0)).getPrecision()); } if (typeTakesPrecision(type)) { assertEquals(2, new NumberField(type, 2).getPrecision()); assertEquals(2, new NumberField(type, 2, new Integer(0)).getPrecision()); if (typeTakesScale(type)) { assertEquals(2, new NumberField(type, 2, 2).getPrecision()); assertEquals(2, new NumberField(type, 2, 2, new Integer(0)).getPrecision()); assertEquals(2, new NumberField(type, 2, 2, new Integer(0)).getPrecision()); } } } }