@Test public void canRepublishApi() { ApiVersions apiVersions = processApi(apiVersion); apiVersions.republish(); assertThat(getStatusCode(apiVersions), is((equalTo(500)))); }
private ApiVersions processApi(ApiVersionBean apiVersionBean) { ApiVersions apiVersions = new ApiVersions(apiVersionBean.getApi()); apiVersions.fetch(apiVersionBean.getVersion()); return apiVersions.update(updateApiVersionBean); }
private int getStatusCode(ApiVersions apiVersions) { return givenGateway().get(apiVersions.getManagedEndpoint()).getStatusCode(); }