Money { @Nonnull public Money withAmount(@Nonnull final Integer amount) { return new Money(currency, amount); } Money(
            @Nonnull final Currency currency,
            @Nonnull final Integer amount); @SuppressWarnings({"ConstantConditions", "UnusedDeclaration"}) @Deprecated private  Money(); @Nonnull Currency getCurrency(); @Nonnull Integer getAmount(); @Nonnull Money withCurrency(@Nonnull final Currency currency); @Nonnull Money withAmount(@Nonnull final Integer amount); boolean canEqual(@Nonnull final Object obj); @Override boolean equals(@Nullable final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testWithAmount() { LOG.info("testWithAmount"); Assert.assertTrue(y2 == x.withAmount(y2).getAmount()); Assert.assertTrue(x2 == y.withAmount(x2).getAmount()); }