### Question:
LinearFontScalar implements FontScalar { @Override public float scale(final int value, final int minValue, final int maxValue) { final float leftSpan = maxValue - minValue; final float rightSpan = maxFont - minFont; final float valueScaled = (value - minValue) / leftSpan; return minFont + (valueScaled * rightSpan); } LinearFontScalar(final int minFont, final int maxFont); @Override float scale(final int value, final int minValue, final int maxValue);  }### Answer:
@Test public void testScale() { final LinearFontScalar fontScalar = new LinearFontScalar(-1, 13); Assert.assertEquals(5.0f, fontScalar.scale(4, 1, 8), 0.0f); final LinearFontScalar fontScalar2 = new LinearFontScalar(0, 0); Assert.assertEquals(Float.NaN, fontScalar2.scale(0, 0, 0), 0.0f); }