### Question:
Price extends MonetaryWrapper implements Comparable<Price> { public static Price valueOf(String currencyCode, long value) { if (CurrencyUtil.isFiatCurrency(currencyCode)) { return new Price(Fiat.valueOf(currencyCode, value)); } else { return new Price(Altcoin.valueOf(currencyCode, value)); } } Price(Monetary monetary); static Price parse(String currencyCode, String input); static Price valueOf(String currencyCode, long value); Volume getVolumeByAmount(Coin amount); Coin getAmountByVolume(Volume volume); String getCurrencyCode(); long getValue(); @Override int compareTo(@NotNull Price other); boolean isPositive(); Price subtract(Price other); String toFriendlyString(); String toPlainString(); @Override String toString();  }### Answer:
@Test public void testValueOf() { Price result = Price.valueOf("USD", 1); Assert.assertEquals( "Fiat value should have four decimals.", "0.0001 BTC/USD", result.toFriendlyString() ); result = Price.valueOf("EUR", 1234); Assert.assertEquals( "Fiat value should be given two decimals", "0.1234 BTC/EUR", result.toFriendlyString() ); Assert.assertEquals( "Negative value should be parsed correctly.", -1L, Price.valueOf("LTC", -1L).getValue() ); Assert.assertEquals( "Too many decimals should get rounded up properly.", "10000.2346 LTC/BTC", Price.valueOf("LTC", 1000023456789L).toFriendlyString() ); Assert.assertEquals( "Too many decimals should get rounded down properly.", "10000.2345 LTC/BTC", Price.valueOf("LTC", 1000023454999L).toFriendlyString() ); Assert.assertEquals( "Underlying long value should be correct.", 1000023456789L, Price.valueOf("LTC", 1000023456789L).getValue() ); }