### Question:
Money implements FxConvertible<Money>, Comparable<Money>, Serializable { @FromString public static Money parse(String amountStr) { ArgChecker.notNull(amountStr, "amountStr"); List<String> split = Splitter.on(' ').splitToList(amountStr); if (split.size() != 2) { throw new IllegalArgumentException("Unable to parse amount, invalid format: " + amountStr); } try { Currency cur = Currency.parse(split.get(0)); return new Money(cur, new BigDecimal(split.get(1))); } catch (RuntimeException ex) { throw new IllegalArgumentException("Unable to parse amount: " + amountStr, ex); } } private  Money(Currency currency, BigDecimal amount); static Money zero(Currency currency); static Money of(CurrencyAmount currencyAmount); static Money of(Currency currency, double amount); static Money of(Currency currency, BigDecimal amount); @FromString static Money parse(String amountStr); Currency getCurrency(); BigDecimal getAmount(); Money plus(Money amountToAdd); Money minus(Money amountToSubtract); Money multipliedBy(long valueToMultiplyBy); boolean isZero(); boolean isPositive(); boolean isNegative(); CurrencyAmount toCurrencyAmount(); Money convertedTo(Currency resultCurrency, BigDecimal fxRate); @Override Money convertedTo(Currency resultCurrency, FxRateProvider rateProvider); @Override int compareTo(Money other); @Override boolean equals(Object obj); @Override int hashCode(); @Override @ToString String toString();  }### Answer:
@Test public void testParse() throws Exception { assertThat(Money.parse("RON 200.23")).isEqualTo(MONEY_200_RON); assertThat(Money.parse("RON 200.2345")).isEqualTo(MONEY_200_RON); }
@Test public void testParseWrongFormat() throws Exception { assertThatIllegalArgumentException() .isThrownBy(() -> Money.parse("200.23 RON")) .withMessage("Unable to parse amount: 200.23 RON"); }
@Test public void testParseWrongElementsNumber() throws Exception { assertThatIllegalArgumentException() .isThrownBy(() -> Money.parse("$100")) .withMessageMatching("Unable to parse amount, invalid format: [$]100"); }