### Question:
Quality { public static BigDecimal fromBookDirectory(Hash256 bookDirectory, boolean payIsNative, boolean getIsNative) { byte[] mantissa = bookDirectory.slice(-7); int exponent = ( bookDirectory.get(-8) & 0xFF) - 100; int scale = -(payIsNative ? exponent - 6 : getIsNative ? exponent + 6 : exponent); BigInteger unsignedBig = new BigInteger(1, mantissa); return new BigDecimal(unsignedBig, scale); }  static BigDecimal fromBookDirectory(Hash256 bookDirectory,
                                               boolean payIsNative,
                                               boolean getIsNative);  }### Answer:
@Test public void testFromBookDirectory() throws Exception { Hash256 hash256 = Hash256.translate.fromString("4627DFFCFF8B5A265EDBD8AE8C14A52325DBFEDAF4F5C32E5C08A1FB2E56F800"); assertEquals(0, BigDecimal.valueOf(24.299) .compareTo(Quality.fromBookDirectory(hash256, true, false))); }