class Money implements ValueObject {

    @Override
    public String toString() {
        String amountString;
        if (amount == 0) {
            amountString = "000";
        } else {
            amountString = Integer.toString(amount);
        }
        return String.format("%s %s.%s", currency, amountString.substring(0, amountString.length() - 2),
                amountString.substring(amountString.length() - 2));
    }

    @JsonCreator public  Money(@NonNull @JsonProperty("currency") Currency currency, @JsonProperty("amount") int amount);
    public  Money(@NonNull Currency currency, double amount);

}