test_class.declarator: JSON = "{\"guestId\":12,\"roomNumber\":\"abc\",\"checkin\":\"2014-11-25\",\"checkout\":\"2014-11-25\"}"
test_class.modifier: private static final
test_class.original_string: private static final String JSON = "{\"guestId\":12,\"roomNumber\":\"abc\",\"checkin\":\"2014-11-25\",\"checkout\":\"2014-11-25\"}";
test_class.type: String
test_class.var_name: JSON
test_class.file: booking/src/test/java/org/koenighotze/jee7hotel/booking/business/events/BookingMessageTOTest.java
test_class.identifier: BookingMessageTOTest
test_case.body: @Test
      public void fromJson() {
          BookingMessageTO fromJson = BookingMessageTO.fromJson(JSON);
  
          assertThat(fromJson.getGuest(), is(equalTo(12L)));
          assertThat(fromJson.getRoom(), is(equalTo("abc")));
          assertThat(fromJson.getCheckin(), is(equalTo(LocalDate.of(2014, Month.NOVEMBER, 25))));
          assertThat(fromJson.getCheckout(), is(equalTo(LocalDate.of(2014, Month.NOVEMBER, 25))));
      }
test_case.class_method_signature: BookingMessageTOTest.fromJson()
test_case.full_signature: @Test public void fromJson()
test_case.identifier: fromJson
test_case.invocations: fromJson assertThat getGuest is equalTo assertThat getRoom is equalTo assertThat getCheckin is equalTo of assertThat getCheckout is equalTo of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void fromJson()
focal_class.declarator: guest
focal_class.modifier: private
focal_class.original_string: private Long guest;
focal_class.type: Long
focal_class.var_name: guest
focal_class.declarator: room
focal_class.modifier: private
focal_class.original_string: private String room;
focal_class.type: String
focal_class.var_name: room
focal_class.declarator: checkin
focal_class.modifier: private
focal_class.original_string: private LocalDate checkin;
focal_class.type: LocalDate
focal_class.var_name: checkin
focal_class.declarator: checkout
focal_class.modifier: private
focal_class.original_string: private LocalDate checkout;
focal_class.type: LocalDate
focal_class.var_name: checkout
focal_class.file: booking/src/main/java/org/koenighotze/jee7hotel/booking/business/events/BookingMessageTO.java
focal_class.identifier: BookingMessageTO
focal_class.class_method_signature: BookingMessageTO.BookingMessageTO(Long guest, String room, LocalDate checkin, LocalDate checkout)
focal_class.full_signature: public  BookingMessageTO(Long guest, String room, LocalDate checkin, LocalDate checkout)
focal_class.identifier: BookingMessageTO
focal_class.modifiers: public
focal_class.parameters: (Long guest, String room, LocalDate checkin, LocalDate checkout)
focal_class.signature:  BookingMessageTO(Long guest, String room, LocalDate checkin, LocalDate checkout)
focal_class.class_method_signature: BookingMessageTO.getGuest()
focal_class.full_signature: public Long getGuest()
focal_class.identifier: getGuest
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getGuest()
focal_class.class_method_signature: BookingMessageTO.getRoom()
focal_class.full_signature: public String getRoom()
focal_class.identifier: getRoom
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRoom()
focal_class.class_method_signature: BookingMessageTO.getCheckin()
focal_class.full_signature: public LocalDate getCheckin()
focal_class.identifier: getCheckin
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LocalDate
focal_class.signature: LocalDate getCheckin()
focal_class.class_method_signature: BookingMessageTO.getCheckout()
focal_class.full_signature: public LocalDate getCheckout()
focal_class.identifier: getCheckout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LocalDate
focal_class.signature: LocalDate getCheckout()
focal_class.class_method_signature: BookingMessageTO.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: BookingMessageTO.fromJson(String json)
focal_class.full_signature: public static BookingMessageTO fromJson(String json)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (String json)
focal_class.return: BookingMessageTO
focal_class.signature: BookingMessageTO fromJson(String json)
focal_class.class_method_signature: BookingMessageTO.toJson()
focal_class.full_signature: public String toJson()
focal_class.identifier: toJson
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toJson()
focal_method.body: public static BookingMessageTO fromJson(String json) {
          try (ByteArrayInputStream bos = new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8))) {
              return new BookingMessageTOReader().readFrom(null, null, null, null, null, bos);
          } catch (IOException e) {
              throw new RuntimeException("Cannot convert " + json, e);
          }
  
  
  //        JsonReader reader = Json.createReader(new StringReader(json));
  //
  //        JsonObject jsonObject = reader.readObject();
  //        Long guestId = jsonObject.getJsonNumber("guestId").longValue();
  //        String roomNumber = jsonObject.getString("roomNumber");
  //
  //        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
  //
  //        LocalDate checkin = LocalDate.parse(jsonObject.getString("checkin"), formatter);
  //        LocalDate checkout = LocalDate.parse(jsonObject.getString("checkout"), formatter);
  //        return new BookingMessageTO(guestId, roomNumber, checkin, checkout);
      }
focal_method.class_method_signature: BookingMessageTO.fromJson(String json)
focal_method.full_signature: public static BookingMessageTO fromJson(String json)
focal_method.identifier: fromJson
focal_method.invocations: getBytes readFrom
focal_method.modifiers: public static
focal_method.parameters: (String json)
focal_method.return: BookingMessageTO
focal_method.signature: BookingMessageTO fromJson(String json)