@Test
public void a_json_reservation_can_be_read() throws IOException {

    String json = "{\"guestId\":\"9999\",\"reservationNumber\":\"abc-123\",\"checkinDate\":\"2013-01-01\",\"checkoutDate\":\"2013-02-01\",\"assignedRoomId\":\"999\",\"reservationStatus\":\"CLOSED\",\"costsInEuro\":242.23}";
    Reservation reservation = new ReservationBodyReader(new ReservationCostCalculator()).readFrom(Reservation.class, null, null, null, null, new ByteArrayInputStream(json.getBytes()));
    assertThat(reservation).isNotNull();
    assertThat(reservation.getGuest()).isEqualTo("9999");
    assertThat(reservation.getReservationNumber()).isEqualTo("abc-123");
    assertThat(reservation.getCostsInEuro()).isEqualTo(new BigDecimal("242.23"));
    assertThat(reservation.getReservationStatus()).isEqualTo(OPEN);
    assertThat(reservation.getCheckinDate()).isEqualTo(of(2013, 1, 1));
    assertThat(reservation.getCheckoutDate()).isEqualTo(of(2013, 2, 1));
    assertThat(reservation.getAssignedRoom()).isEqualTo("999");
}