diff --git a/src/main/java/com/frameworkium/core/api/dto/AbstractDTO.java b/src/main/java/com/frameworkium/core/api/dto/AbstractDTO.java new file mode 100644 index 00000000..542452a5 --- /dev/null +++ b/src/main/java/com/frameworkium/core/api/dto/AbstractDTO.java @@ -0,0 +1,35 @@ +package com.frameworkium.core.api.dto; + +import org.apache.commons.lang3.SerializationUtils; +import org.apache.commons.lang3.builder.*; + +import java.io.Serializable; + +public abstract class AbstractDTO implements Serializable, Cloneable { + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } + + @Override + public boolean equals(Object obj) { + return EqualsBuilder.reflectionEquals(this, obj); + } + + @Override + @SuppressWarnings("unchecked") + protected T clone() throws CloneNotSupportedException { + try { + return (T) SerializationUtils.clone(this); + } catch (Exception e) { + throw new CloneNotSupportedException(e.toString()); + } + } + + @Override + public String toString() { + return ReflectionToStringBuilder.toString( + this, ToStringStyle.SHORT_PREFIX_STYLE); + } +} diff --git a/src/test/groovy/com/frameworkium/core/api/dto/AbstractDTOSpec.groovy b/src/test/groovy/com/frameworkium/core/api/dto/AbstractDTOSpec.groovy new file mode 100644 index 00000000..48b90c9a --- /dev/null +++ b/src/test/groovy/com/frameworkium/core/api/dto/AbstractDTOSpec.groovy @@ -0,0 +1,42 @@ +package com.frameworkium.core.api.dto + +import spock.lang.Specification + +class AbstractDTOSpec extends Specification { + + def sut = new TopLevelDTO() + + def "two different DTOs with the same data are equal but not =="() { + given: + def sut2 = new TopLevelDTO() + expect: + sut.equals(sut2) + !sut.is(sut2) // == in Java + sut.hashCode() == sut2.hashCode() + } + + def "two different DTOs with different data are not equal"() { + given: + def sut2 = new TopLevelDTO() + sut2.lowLevelDTO.data = "foo" + expect: + sut != sut2 + !sut.is(sut2) // == in Java + sut.hashCode() != sut2.hashCode() + } + + def "Cloning a DTOs makes a deep not shallow clone"() { + given: + def clone = sut.clone() + when: + clone.lowLevelDTO.data = "something" + then: + sut.lowLevelDTO.data != "something" + } + + def "toString() creates readable output"() { + expect: + sut.toString() == 'TopLevelDTO[lowLevelDTO=LowLevelDTO[data=initial]]' + } + +} diff --git a/src/test/java/com/frameworkium/core/api/dto/LowLevelDTO.java b/src/test/java/com/frameworkium/core/api/dto/LowLevelDTO.java new file mode 100644 index 00000000..f18ef658 --- /dev/null +++ b/src/test/java/com/frameworkium/core/api/dto/LowLevelDTO.java @@ -0,0 +1,5 @@ +package com.frameworkium.core.api.dto; + +public class LowLevelDTO extends AbstractDTO { + String data = "initial"; +} diff --git a/src/test/java/com/frameworkium/core/api/dto/TopLevelDTO.java b/src/test/java/com/frameworkium/core/api/dto/TopLevelDTO.java new file mode 100644 index 00000000..a643f5b5 --- /dev/null +++ b/src/test/java/com/frameworkium/core/api/dto/TopLevelDTO.java @@ -0,0 +1,5 @@ +package com.frameworkium.core.api.dto; + +public class TopLevelDTO extends AbstractDTO { + LowLevelDTO lowLevelDTO = new LowLevelDTO(); +} diff --git a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Browser.java b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Browser.java index b6453e2f..05264478 100644 --- a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Browser.java +++ b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Browser.java @@ -1,10 +1,9 @@ package com.frameworkium.integration.ai.capture.api.dto.executions; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import com.frameworkium.core.api.dto.AbstractDTO; + +public class Browser extends AbstractDTO { -/** Browser message. */ -public class Browser { public String name; public String version; @@ -14,34 +13,4 @@ public static Browser newInstance() { browser.version = "49.0"; return browser; } - - @Override - public String toString() { - return "Browser{" + - "name='" + name + '\'' + - ", version='" + version + '\'' + - '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - - if (o == null || getClass() != o.getClass()) return false; - - Browser browser = (Browser) o; - - return new EqualsBuilder() - .append(name, browser.name) - .append(version, browser.version) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(name) - .append(version) - .toHashCode(); - } } diff --git a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Execution.java b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Execution.java index 79a8af6f..ebbe4981 100644 --- a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Execution.java +++ b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/Execution.java @@ -1,10 +1,11 @@ package com.frameworkium.integration.ai.capture.api.dto.executions; +import com.frameworkium.core.api.dto.AbstractDTO; + import java.net.InetAddress; import java.net.UnknownHostException; -/** Execution message. */ -public class Execution { +public class Execution extends AbstractDTO { // used in the create public String testID; @@ -19,7 +20,7 @@ public class Execution { public String executionID; /** - * Using the static factory method pattern instead of using the constructor + * Using the static factory method pattern instead of using a constructor * to ensure this class can be used for both input and output. Also allows * for multiple different creation methods in one place. * diff --git a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionID.java b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionID.java index f5c5b6de..0150e23f 100644 --- a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionID.java +++ b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionID.java @@ -1,7 +1,9 @@ package com.frameworkium.integration.ai.capture.api.dto.executions; +import com.frameworkium.core.api.dto.AbstractDTO; + /** Created execution message. */ -public class ExecutionID { +public class ExecutionID extends AbstractDTO { public String executionID; } diff --git a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionResults.java b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionResults.java index cc844dbd..67cd7bdd 100644 --- a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionResults.java +++ b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/ExecutionResults.java @@ -1,9 +1,10 @@ package com.frameworkium.integration.ai.capture.api.dto.executions; +import com.frameworkium.core.api.dto.AbstractDTO; + import java.util.List; -/** Executions message */ -public class ExecutionResults { +public class ExecutionResults extends AbstractDTO { public List results; public int total; diff --git a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/SoftwareUnderTest.java b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/SoftwareUnderTest.java index 1c976eea..75871e64 100644 --- a/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/SoftwareUnderTest.java +++ b/src/test/java/com/frameworkium/integration/ai/capture/api/dto/executions/SoftwareUnderTest.java @@ -1,10 +1,9 @@ package com.frameworkium.integration.ai.capture.api.dto.executions; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import com.frameworkium.core.api.dto.AbstractDTO; + +public class SoftwareUnderTest extends AbstractDTO { -/** Represents the Software under test message. */ -public class SoftwareUnderTest { public String name; public String version; @@ -15,33 +14,4 @@ public static SoftwareUnderTest newInstance() { return sut; } - @Override - public String toString() { - return "SoftwareUnderTest{" + - "name='" + name + '\'' + - ", version='" + version + '\'' + - '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - - if (o == null || getClass() != o.getClass()) return false; - - SoftwareUnderTest that = (SoftwareUnderTest) o; - - return new EqualsBuilder() - .append(name, that.name) - .append(version, that.version) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37) - .append(name) - .append(version) - .toHashCode(); - } } diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/constant/BookerEndpoint.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/constant/BookerEndpoint.java new file mode 100644 index 00000000..b2f5908a --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/constant/BookerEndpoint.java @@ -0,0 +1,29 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.constant; + +import com.frameworkium.core.api.Endpoint; + +/** The various Endpoints of Restful Booker. */ +public enum BookerEndpoint implements Endpoint { + + BASE_URI("https://restful-booker.herokuapp.com"), + PING("/ping"), + BOOKING("/booking"), + BOOKING_ID("/booking/%d"), + AUTH("/auth"); + + private String url; + + BookerEndpoint(String url) { + this.url = url; + } + + /** + * @param params Arguments referenced by the format specifiers in the url. + * @return A formatted String representing the URL of the given constant. + */ + @Override + public String getUrl(Object... params) { + return String.format(url, params); + } + +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/Booking.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/Booking.java new file mode 100644 index 00000000..06aa6707 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/Booking.java @@ -0,0 +1,28 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.dto.booking; + +import com.frameworkium.core.api.dto.AbstractDTO; + +import java.util.concurrent.ThreadLocalRandom; + +public class Booking extends AbstractDTO { + public String firstname; + public String lastname; + public long totalprice; + public boolean depositpaid; + public BookingDates bookingdates; + public String additionalneeds; + + public static Booking newInstance() { + ThreadLocalRandom random = ThreadLocalRandom.current(); + int randInt = random.nextInt(); + Booking booking = new Booking(); + booking.firstname = "firstname" + randInt; + booking.lastname = "lastname" + randInt; + booking.totalprice = randInt; + booking.depositpaid = random.nextBoolean(); + booking.bookingdates = BookingDates.newInstance(); + booking.additionalneeds = null; + return booking; + } +} + diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingDates.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingDates.java new file mode 100644 index 00000000..57414369 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingDates.java @@ -0,0 +1,22 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.dto.booking; + +import com.frameworkium.core.api.dto.AbstractDTO; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +public class BookingDates extends AbstractDTO { + + public static final DateTimeFormatter FORMAT = + DateTimeFormatter.ofPattern("YYYY-MM-DD"); + + public String checkin; + public String checkout; + + public static BookingDates newInstance() { + BookingDates dates = new BookingDates(); + dates.checkin = LocalDate.now().plusDays(1).format(FORMAT); + dates.checkout = LocalDate.now().plusDays(10).format(FORMAT); + return dates; + } +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingID.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingID.java new file mode 100644 index 00000000..d5085166 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingID.java @@ -0,0 +1,14 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.dto.booking; + +import com.frameworkium.core.api.dto.AbstractDTO; + +public class BookingID extends AbstractDTO { + + public int bookingid; + + public static BookingID of(int bookingID) { + BookingID id = new BookingID(); + id.bookingid = bookingID; + return id; + } +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingResponse.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingResponse.java new file mode 100644 index 00000000..4c0a10c7 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/BookingResponse.java @@ -0,0 +1,7 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.dto.booking; + +import com.frameworkium.core.api.dto.AbstractDTO; + +public class BookingResponse extends AbstractDTO { + public Booking booking; +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/SearchParamsMapper.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/SearchParamsMapper.java new file mode 100644 index 00000000..6c42f2df --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/dto/booking/SearchParamsMapper.java @@ -0,0 +1,24 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.dto.booking; + +import com.google.common.collect.ImmutableMap; + +import java.util.Map; + +public class SearchParamsMapper { + + private SearchParamsMapper() { + // hide constructor of mapper + } + + public static Map namesOfBooking(Booking booking) { + return ImmutableMap.of( + "firstname", booking.firstname, + "lastname", booking.lastname); + } + + public static Map datesOfBooking(Booking booking) { + return ImmutableMap.of( + "checkin", booking.bookingdates.checkin, + "checkout", booking.bookingdates.checkout); + } +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/AbstractBookerService.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/AbstractBookerService.java new file mode 100755 index 00000000..5b53ba1e --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/AbstractBookerService.java @@ -0,0 +1,47 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.service; + +import com.frameworkium.core.api.services.BaseService; +import com.frameworkium.integration.heroku.restfulbooker.api.constant.BookerEndpoint; +import io.restassured.RestAssured; +import io.restassured.http.Method; +import io.restassured.response.ExtractableResponse; +import io.restassured.specification.RequestSpecification; +import io.restassured.specification.ResponseSpecification; +import org.apache.http.HttpStatus; + +/** Base Service for RestfulBooker specific services. */ +public abstract class AbstractBookerService extends BaseService { + + /** + * @return a Rest Assured {@link RequestSpecification} with the baseUri + * (and anything else required by most Capture services). + */ + @Override + protected RequestSpecification getRequestSpec() { + return RestAssured.given() + .baseUri(BookerEndpoint.BASE_URI.getUrl()) + .relaxedHTTPSValidation() // trusts even invalid certs + // .log().all() // uncomment to log each request + .contentType("application/json") + .accept("application/json"); + } + + /** + * @return a Rest Assured {@link ResponseSpecification} with basic checks + * (and anything else required by most services). + */ + @Override + protected ResponseSpecification getResponseSpec() { + return RestAssured.expect().response() + .statusCode(HttpStatus.SC_OK); + } + + protected ExtractableResponse get(String url) { + return request(url); + } + + protected ExtractableResponse post(Object body, String url) { + return request(Method.POST, body, url); + } + +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/booking/BookingService.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/booking/BookingService.java new file mode 100644 index 00000000..d7e9a42f --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/booking/BookingService.java @@ -0,0 +1,65 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.service.booking; + +import com.frameworkium.integration.heroku.restfulbooker.api.constant.BookerEndpoint; +import com.frameworkium.integration.heroku.restfulbooker.api.dto.booking.*; +import com.frameworkium.integration.heroku.restfulbooker.api.service.AbstractBookerService; +import com.google.common.collect.ImmutableMap; +import io.restassured.http.Method; + +import java.util.List; +import java.util.Map; + +public class BookingService extends AbstractBookerService { + + public List listBookings() { + return get(BookerEndpoint.BOOKING.getUrl()) + .jsonPath().getList(".", BookingID.class); + } + + public Booking getBooking(int id) { + return get(BookerEndpoint.BOOKING_ID.getUrl(id)) + .as(Booking.class); + } + + public BookingResponse createBooking(Booking booking) { + return post(booking, BookerEndpoint.BOOKING.getUrl()) + .as(BookingResponse.class); + } + + public List search(Map searchParams) { + return request(Method.GET, searchParams, BookerEndpoint.BOOKING.getUrl()) + .jsonPath().getList(".", BookingID.class); + } + + public String createAuthToken(String username, String password) { + return post( + ImmutableMap.of("username", username, "password", password), + BookerEndpoint.AUTH.getUrl()) + .jsonPath().get("token"); + } + + public void delete(int bookingID, String token) { + getRequestSpec() + .cookie("token", token) + .delete(BookerEndpoint.BOOKING_ID.getUrl(bookingID)) + // Bug, API is different to documentation + // .then() + // .statusCode(HttpStatus.SC_NO_CONTENT) + ; + } + + public boolean doesBookingExist(int bookingID) { + final int statusCode = getRequestSpec() + .get(BookerEndpoint.BOOKING_ID.getUrl(bookingID)) + .then() + .extract() + .statusCode(); + if (statusCode == 200) { + return true; + } else if (statusCode == 404) { + return false; + } else { + throw new IllegalStateException("Unexpected return code"); + } + } +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/ping/PingService.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/ping/PingService.java new file mode 100644 index 00000000..8e433dcc --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/service/ping/PingService.java @@ -0,0 +1,24 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.service.ping; + +import com.frameworkium.integration.heroku.restfulbooker.api.constant.BookerEndpoint; +import com.frameworkium.integration.heroku.restfulbooker.api.service.AbstractBookerService; +import io.restassured.RestAssured; +import io.restassured.specification.ResponseSpecification; +import org.apache.http.HttpStatus; + +public class PingService extends AbstractBookerService { + + public String ping() { + return get(BookerEndpoint.PING.getUrl()) + .body().asString(); + } + + /** + * Used in template method {@link AbstractBookerService#get(String)} + */ + @Override + protected ResponseSpecification getResponseSpec() { + return RestAssured.expect().response() + .statusCode(HttpStatus.SC_CREATED); + } +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/BookerTest.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/BookerTest.java new file mode 100644 index 00000000..da804d85 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/BookerTest.java @@ -0,0 +1,66 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.tests; + +import com.frameworkium.core.api.tests.BaseTest; +import com.frameworkium.integration.heroku.restfulbooker.api.dto.booking.*; +import com.frameworkium.integration.heroku.restfulbooker.api.service.booking.BookingService; +import com.frameworkium.integration.heroku.restfulbooker.api.service.ping.PingService; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.Map; + +import static com.google.common.truth.Truth.assertThat; + +public class BookerTest extends BaseTest { + + @BeforeClass + public void ensure_site_is_up_by_using_ping_service() { + assertThat(new PingService().ping()) + .isEqualTo("Created"); + } + + @Test + public void create_new_booking() { + BookingService service = new BookingService(); + Booking booking = Booking.newInstance(); + + BookingResponse bookingResponse = service.createBooking(booking); + assertThat(bookingResponse.booking).isEqualTo(booking); + // also check it persisted, but need to search for booking ID + assertThat(service.getBooking(searchBookingIDByName(booking))) + .isEqualTo(booking); + } + + private int searchBookingIDByName(Booking booking) { + Map searchParams = SearchParamsMapper.namesOfBooking(booking); + List bookingIDs = + new BookingService().search(searchParams); + assertThat(bookingIDs.size()).isEqualTo(1); + return bookingIDs.get(0).bookingid; + } + + @Test + public void auth_token_matches_expected_pattern() { + String token = new BookingService().createAuthToken( + "admin", "password123"); + assertThat(token).matches("[a-z0-9]{15}"); + } + + @Test + public void delete_newly_created_booking() { + // create booking + BookingService service = new BookingService(); + Booking booking = Booking.newInstance(); + + service.createBooking(booking); + int bookingID = searchBookingIDByName(booking); + String token = new BookingService().createAuthToken( + "admin", "password123"); + service.delete(bookingID, token); + assertThat(service.doesBookingExist(bookingID)).isFalse(); + assertThat(service.listBookings()) + .doesNotContain(BookingID.of(bookingID)); + } + +} diff --git a/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/SearchBookerTest.java b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/SearchBookerTest.java new file mode 100644 index 00000000..836d8903 --- /dev/null +++ b/src/test/java/com/frameworkium/integration/heroku/restfulbooker/api/tests/SearchBookerTest.java @@ -0,0 +1,48 @@ +package com.frameworkium.integration.heroku.restfulbooker.api.tests; + +import com.frameworkium.core.api.tests.BaseTest; +import com.frameworkium.integration.heroku.restfulbooker.api.dto.booking.*; +import com.frameworkium.integration.heroku.restfulbooker.api.service.booking.BookingService; +import com.frameworkium.integration.heroku.restfulbooker.api.service.ping.PingService; +import org.testng.SkipException; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.util.List; + +import static com.google.common.truth.Truth.assertThat; + +public class SearchBookerTest extends BaseTest { + + @BeforeClass + public void ensure_site_is_up_by_using_ping_service() { + assertThat(new PingService().ping()) + .isEqualTo("Created"); + } + + @Test + public void search_for_existing_records_by_name() { + BookingService service = new BookingService(); + BookingID existingID = service.listBookings().get(1); + Booking booking = service.getBooking(existingID.bookingid); + + List bookingIDs = service.search( + SearchParamsMapper.namesOfBooking(booking)); + + assertThat(bookingIDs).contains(existingID); + } + + @Test + public void search_for_existing_records_by_date() { + BookingService service = new BookingService(); + BookingID existingID = service.listBookings().get(3); + Booking booking = service.getBooking(existingID.bookingid); + + List bookingIDs = service.search( + SearchParamsMapper.datesOfBooking(booking)); + + throw new SkipException("Known bug in service, dates not inclusive"); + // assertThat(bookingIDs).contains(existingID); + } + +}