### Question:
Instruments implements Iterable<Instrument> { public Instrument get(String instrument) { for (Instrument value : values) { if (instrument.equals(value.asString())) return value; } return null; } private  Instruments(Instrument[] values, int priceIntegerDigits, int maxPriceFractionDigits,
            int sizeIntegerDigits, int maxSizeFractionDigits); Instrument get(String instrument); Instrument get(long instrument); Iterator<Instrument> iterator(); int getMaxPriceFractionDigits(); int getMaxSizeFractionDigits(); int getPriceWidth(); int getSizeWidth(); String getPricePlaceholder(); String getSizePlaceholder(); static Instruments fromConfig(Config config, String path);  }### Answer:
@Test public void sizeFormatWithIntegers() { assertEquals("%8.0f ", FRACTIONS.get("FOO").getSizeFormat()); }
@Test public void sizeFormatWithFractions() { assertEquals("%17.8f", FRACTIONS.get("BAR").getSizeFormat()); }
@Test public void priceFactor() { assertEquals(100.0, FRACTIONS.get("FOO").getPriceFactor(), 0.0); }
@Test public void sizeFactorWithIntegers() { assertEquals(1.0, FRACTIONS.get("FOO").getSizeFactor(), 0.0); }
@Test public void sizeFactorWithFractions() { assertEquals(100000000.0, FRACTIONS.get("BAR").getSizeFactor(), 0.0); }
@Test public void sizeFormatWithIntegersOnly() { assertEquals("%8.0f", INTEGERS.get("FOO").getSizeFormat()); }
@Test public void priceFractionDigits() { assertEquals(2, FRACTIONS.get("FOO").getPriceFractionDigits()); }
@Test public void sizeFractionDigitsWithIntegers() { assertEquals(0, FRACTIONS.get("FOO").getSizeFractionDigits()); }
@Test public void sizeFractionDigitsWithFractions() { assertEquals(8, FRACTIONS.get("BAR").getSizeFractionDigits()); }
@Test public void priceFormat() { assertEquals("%7.2f ", FRACTIONS.get("FOO").getPriceFormat()); }