### Question:
UnsignedDecimalEncodedValue extends UnsignedIntEncodedValue implements DecimalEncodedValue { @Override public final double getDecimal(boolean reverse, IntsRef ref) { int value = getInt(reverse, ref); if (useMaximumAsInfinity && value == maxValue) return Double.POSITIVE_INFINITY; if (value == 0) return defaultValue; return value * factor; } UnsignedDecimalEncodedValue(String name, int bits, double factor, boolean storeTwoDirections);  UnsignedDecimalEncodedValue(String name, int bits, double factor, double defaultValue, boolean storeTwoDirections);  UnsignedDecimalEncodedValue(String name, int bits, double factor, double defaultValue, boolean storeTwoDirections, boolean useMaximumAsInfinity); @Override final void setDecimal(boolean reverse, IntsRef ints, double value); @Override final double getDecimal(boolean reverse, IntsRef ref); @Override double getMaxDecimal(); @Override boolean equals(Object o); @Override int getVersion();  }### Answer:
@Test public void getDecimal() { UnsignedDecimalEncodedValue testEnc = new UnsignedDecimalEncodedValue("test", 3, 1, 100, false); testEnc.init(new EncodedValue.InitializerConfig()); IntsRef intsRef = new IntsRef(1); testEnc.setDecimal(false, intsRef, 7); assertEquals(7, testEnc.getDecimal(false, intsRef), .1); }