public void shouldBuildStringWithRoomFormatForREST() {
final HotelListRequest request = new HotelListRequest();
final RoomGroup group = new RoomGroup();
request.setRoomGroup(group);
final Room room1 = new Room();
room1.setNumberOfAdults(1);
group.getRoom().add(room1);
final StringBuilder builder1 = new StringBuilder();
JsonFormBodyWriter.writeTo(request.getClass(), request, builder1);
assertThat("Result strings should be the same.",
builder1.toString(), is(equalTo("&cid=0&room1=1")));
final Room room2 = new Room();
room2.setNumberOfAdults(2);
room2.setNumberOfChildren(2);
room2.getChildAges().add(5);
room2.getChildAges().add(12);
group.getRoom().add(room2);
final StringBuilder builder2 = new StringBuilder();
JsonFormBodyWriter.writeTo(request.getClass(), request, builder2);
assertThat("Result strings should be the same.",