@Test public void testMoneySerialization() throws IOException { JodaMoneySerializer jodaMoneySerializer = new JodaMoneySerializer(); Money value = Money.of(CurrencyUnit.EUR, 234.56); jodaMoneySerializer.serialize(value, jsonGenerator, null); verify(jsonGenerator).writeString("234.56 €"); }
@Override public void serialize(Money value, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeString(value.getAmount() + " €"); }
JodaMoneySerializer extends JsonSerializer<Money> { @Override public void serialize(Money value, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeString(value.getAmount() + " €"); } }
JodaMoneySerializer extends JsonSerializer<Money> { @Override public void serialize(Money value, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeString(value.getAmount() + " €"); }  }
JodaMoneySerializer extends JsonSerializer<Money> { @Override public void serialize(Money value, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeString(value.getAmount() + " €"); }  @Override void serialize(Money value, JsonGenerator jgen, SerializerProvider provider); }
JodaMoneySerializer extends JsonSerializer<Money> { @Override public void serialize(Money value, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeString(value.getAmount() + " €"); }  @Override void serialize(Money value, JsonGenerator jgen, SerializerProvider provider);  }