DATAREST-978 - Migrate ticket references in test code to Spring Framework style.

This commit is contained in:
Mark Paluch
2017-01-13 10:07:39 +01:00
parent 992512cf96
commit 6bb989018c
99 changed files with 518 additions and 1777 deletions

View File

@@ -1,6 +1,6 @@
package org.springframework.data.rest.tests;
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,11 +66,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-113
* @see DATAREST-638
*/
@Test
@Test // DATAREST-113, DATAREST-638
public void exposesSchemasForResourcesExposed() throws Exception {
MockHttpServletResponse response = client.request("/");
@@ -95,10 +91,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-203
*/
@Test
@Test // DATAREST-203
public void servesHalWhenRequested() throws Exception {
mvc.perform(get("/")). //
@@ -106,10 +99,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
andExpect(jsonPath("$._links", notNullValue()));
}
/**
* @see DATAREST-203
*/
@Test
@Test // DATAREST-203
public void servesHalWhenJsonIsRequested() throws Exception {
mvc.perform(get("/").accept(MediaType.APPLICATION_JSON)). //
@@ -117,10 +107,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
andExpect(jsonPath("$._links", notNullValue()));
}
/**
* @see DATAREST-203
*/
@Test
@Test // DATAREST-203
public void exposesSearchesForRootResources() throws Exception {
MockHttpServletResponse response = client.request("/");
@@ -166,10 +153,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-198
*/
@Test
@Test // DATAREST-198
public void accessLinkedResources() throws Exception {
MockHttpServletResponse rootResource = client.request("/");
@@ -195,10 +179,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-230
*/
@Test
@Test // DATAREST-230
public void exposesDescriptionAsAlpsDocuments() throws Exception {
MediaType ALPS_MEDIA_TYPE = MediaType.valueOf("application/alps+json");
@@ -214,20 +195,14 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
andExpect(content().contentTypeCompatibleWith(ALPS_MEDIA_TYPE));
}
/**
* @see DATAREST-448
*/
@Test
@Test // DATAREST-448
public void returnsNotFoundForUriNotBackedByARepository() throws Exception {
mvc.perform(get("/index.html")).//
andExpect(status().isNotFound());
}
/**
* @see DATAREST-658
*/
@Test
@Test // DATAREST-658
public void collectionResourcesExposeLinksAsHeadersForHeadRequest() throws Exception {
for (String rel : expectedRootLinkRels()) {
@@ -245,10 +220,7 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-661
*/
@Test
@Test // DATAREST-661
public void patchToNonExistingResourceReturnsNotFound() throws Exception {
String rel = expectedRootLinkRels().iterator().next();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import javax.persistence.Entity;
/**
* @author Alex Leigh
* @see DATAREST-872
*/
@Data
@Entity

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,6 @@ import javax.persistence.OneToOne;
/**
* @author Alex Leigh
* @see DATAREST-872
*/
@Data
@Entity

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* @author Greg Turnquist
* @author Oliver Gierke
* @see DATAREST-463
*/
@Entity
public class Item {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.CrossOrigin;
* @author Greg Turnquist
* @author Oliver Gierke
* @author Mark Paluch
* @see DATAREST-463
*/
@CrossOrigin
public interface ItemRepository extends CrudRepository<Item, Long> {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* @author Alex Leigh
* @see DATAREST-872
*/
@Data
@Entity

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* @author Alex Leigh
* @see DATAREST-872
*/
@Data
@Entity

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import javax.persistence.Entity;
/**
* @author Alex Leigh
* @see DATAREST-872
*/
@Data
@Entity

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* @author Greg Turnquist
* @author Oliver Gierke
* @see DATAREST-463
*/
@Entity
public class User {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,5 @@ import org.springframework.data.repository.CrudRepository;
/**
* @author Greg Turnquist
* @author Oliver Gierke
* @see DATAREST-463
*/
interface UserRepository extends CrudRepository<User, Long> {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,28 +41,19 @@ public class RepositoryControllerIntegrationTests extends AbstractControllerInte
@Autowired RepositoryController controller;
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void rootResourceExposesGetOnly() {
HttpEntity<?> response = controller.optionsForRepositories();
assertAllowHeaders(response, HttpMethod.GET);
}
/**
* @see DATAREST-333, DATAREST-330
*/
@Test
@Test // DATAREST-333, DATAREST-330
public void headRequestReturnsNoContent() {
assertThat(controller.headForRepositories().getStatusCode(), is(HttpStatus.NO_CONTENT));
}
/**
* @see DATAREST-160, DATAREST-333, DATAREST-463
*/
@Test
@Test // DATAREST-160, DATAREST-333, DATAREST-463
public void exposesLinksToRepositories() {
RepositoryLinksResource resource = controller.listRepositories().getBody();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,10 +66,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
@Autowired PersistentEntityResourceAssembler assembler;
@Autowired PersistentEntities entities;
/**
* @see DATAREST-217
*/
@Test(expected = HttpRequestMethodNotSupportedException.class)
@Test(expected = HttpRequestMethodNotSupportedException.class) // DATAREST-217
public void returnsNotFoundForListingEntitiesIfFindAllNotExported() throws Exception {
repository.save(new Address());
@@ -78,10 +75,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
controller.getCollectionResource(request, null, null, null);
}
/**
* @see DATAREST-217
*/
@Test(expected = HttpRequestMethodNotSupportedException.class)
@Test(expected = HttpRequestMethodNotSupportedException.class) // DATAREST-217
public void rejectsEntityCreationIfSaveIsNotExported() throws Exception {
RootResourceInformation request = getResourceInformation(Address.class);
@@ -89,10 +83,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
controller.postCollectionResource(request, null, null, MediaType.APPLICATION_JSON_VALUE);
}
/**
* @see DATAREST-301
*/
@Test
@Test // DATAREST-301
public void setsExpandedSelfUriInLocationHeader() throws Exception {
RootResourceInformation information = getResourceInformation(Order.class);
@@ -106,28 +97,19 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
assertThat(entity.getHeaders().getLocation().toString(), not(Matchers.endsWith("{?projection}")));
}
/**
* @see DATAREST-330
*/
@Test
@Test // DATAREST-330
public void exposesHeadForCollectionResourceIfExported() throws Exception {
ResponseEntity<?> entity = controller.headCollectionResource(getResourceInformation(Person.class),
new DefaultedPageable(null, false));
assertThat(entity.getStatusCode(), is(HttpStatus.NO_CONTENT));
}
/**
* @see DATAREST-330
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-330
public void doesNotExposeHeadForCollectionResourceIfNotExported() throws Exception {
controller.headCollectionResource(getResourceInformation(CreditCard.class), new DefaultedPageable(null, false));
}
/**
* @see DATAREST-330
*/
@Test
@Test // DATAREST-330
public void exposesHeadForItemResourceIfExported() throws Exception {
Address address = repository.save(new Address());
@@ -138,48 +120,33 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
assertThat(entity.getStatusCode(), is(HttpStatus.NO_CONTENT));
}
/**
* @see DATAREST-330
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-330
public void doesNotExposeHeadForItemResourceIfNotExisting() throws Exception {
controller.headForItemResource(getResourceInformation(CreditCard.class), 1L, assembler);
}
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void doesNotExposeMethodsForOptionsIfNotHttpMethodsSupportedForCollectionResource() {
HttpEntity<?> response = controller.optionsForCollectionResource(getResourceInformation(Address.class));
assertAllowHeaders(response, OPTIONS);
}
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void exposesSupportedHttpMethodsInAllowHeaderForOptionsRequestToCollectionResource() {
HttpEntity<?> response = controller.optionsForCollectionResource(getResourceInformation(Person.class));
assertAllowHeaders(response, GET, POST, HEAD, OPTIONS);
}
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void exposesSupportedHttpMethodsInAllowHeaderForOptionsRequestToItemResource() {
HttpEntity<?> response = controller.optionsForItemResource(getResourceInformation(Person.class));
assertAllowHeaders(response, GET, PUT, PATCH, DELETE, HEAD, OPTIONS);
}
/**
* @see DATAREST-333, DATAREST-348
*/
@Test
@Test // DATAREST-333, DATAREST-348
public void optionsForItermResourceSetsAllowPatchHeader() {
ResponseEntity<?> entity = controller.optionsForItemResource(getResourceInformation(Person.class));
@@ -194,10 +161,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
MediaType.APPLICATION_JSON_VALUE));
}
/**
* @see DATAREST-34
*/
@Test
@Test // DATAREST-34
public void returnsBodyOnPutForUpdateIfAcceptHeaderPresentByDefault() throws Exception {
RootResourceInformation request = getResourceInformation(Order.class);
@@ -210,10 +174,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
MediaType.APPLICATION_JSON_VALUE).hasBody(), is(true));
}
/**
* @see DATAREST-34
*/
@Test
@Test // DATAREST-34
public void returnsBodyForCreatingPutIfAcceptHeaderPresentByDefault() throws HttpRequestMethodNotSupportedException {
RootResourceInformation request = getResourceInformation(Order.class);
@@ -224,10 +185,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
MediaType.APPLICATION_JSON_VALUE).hasBody(), is(true));
}
/**
* @see DATAREST-34
*/
@Test
@Test // DATAREST-34
public void returnsBodyForPostIfAcceptHeaderIsPresentByDefault() throws Exception {
RootResourceInformation request = getResourceInformation(Order.class);
@@ -239,10 +197,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
.hasBody(), is(true));
}
/**
* @see DATAREST-34
*/
@Test
@Test // DATAREST-34
public void doesNotReturnBodyForPostIfNoAcceptHeaderPresentByDefault() throws Exception {
RootResourceInformation request = getResourceInformation(Order.class);
@@ -255,10 +210,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
is(false));
}
/**
* @see DATAREST-581
*/
@Test
@Test // DATAREST-581
public void createsEtagForProjectedEntityCorrectly() throws Exception {
Address address = repository.save(new Address());
@@ -278,10 +230,7 @@ public class RepositoryEntityControllerIntegrationTests extends AbstractControll
assertThat(entity.getHeaders().getETag(), is(notNullValue()));
}
/**
* @see DATAREST-724
*/
@Test
@Test // DATAREST-724
public void deletesEntityWithCustomLookupCorrectly() throws Exception {
Address address = repository.save(new Address());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,66 +112,42 @@ public class RepositorySearchControllerIntegrationTests extends AbstractControll
tester.withContentResource(new HasSelfLink(BASE.slash(metadata.getPath()).slash("{id}")));
}
/**
* @see DATAREST-330
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-330
public void doesNotExposeHeadForSearchResourceIfResourceDoesnHaveSearches() {
controller.headForSearches(getResourceInformation(Author.class));
}
/**
* @see DATAREST-330
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-330
public void exposesHeadForSearchResourceIfResourceIsNotExposed() {
controller.headForSearches(getResourceInformation(CreditCard.class));
}
/**
* @see DATAREST-330
*/
@Test
@Test // DATAREST-330
public void exposesHeadForSearchResourceIfResourceIsExposed() {
controller.headForSearches(getResourceInformation(Person.class));
}
/**
* @see DATAREST-330
*/
@Test
@Test // DATAREST-330
public void exposesHeadForExistingQueryMethodResource() {
controller.headForSearch(getResourceInformation(Person.class), "findByCreatedUsingISO8601Date");
}
/**
* @see DATAREST-330
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-330
public void doesNotExposeHeadForInvalidQueryMethodResource() {
controller.headForSearch(getResourceInformation(Person.class), "foobar");
}
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void searchResourceSupportsGetOnly() {
assertAllowHeaders(controller.optionsForSearches(getResourceInformation(Person.class)), HttpMethod.GET);
}
/**
* @see DATAREST-333
*/
@Test(expected = ResourceNotFoundException.class)
@Test(expected = ResourceNotFoundException.class) // DATAREST-333
public void returns404ForOptionsForRepositoryWithoutSearches() {
controller.optionsForSearches(getResourceInformation(Address.class));
}
/**
* @see DATAREST-333
*/
@Test
@Test // DATAREST-333
public void queryMethodResourceSupportsGetOnly() {
RootResourceInformation resourceInformation = getResourceInformation(Person.class);
@@ -180,10 +156,7 @@ public class RepositorySearchControllerIntegrationTests extends AbstractControll
assertAllowHeaders(response, HttpMethod.GET);
}
/**
* @see DATAREST-502
*/
@Test
@Test // DATAREST-502
public void interpretsUriAsReferenceToRelatedEntity() {
MultiValueMap<String, Object> parameters = new LinkedMultiValueMap<String, Object>(1);
@@ -197,10 +170,7 @@ public class RepositorySearchControllerIntegrationTests extends AbstractControll
assertThat(result.getBody(), is(instanceOf(Resources.class)));
}
/**
* @see DATAREST-515
*/
@Test
@Test // DATAREST-515
public void repositorySearchResourceExposesDomainType() {
RepositorySearchesResource searches = controller.listSearches(getResourceInformation(Person.class));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,20 +40,14 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
public class RootResourceInformationIntegrationTests extends AbstractControllerIntegrationTests {
/**
* @see DATAREST-217
*/
@Test
@Test // DATAREST-217
public void getIsNotSupportedIfFindAllIsNotExported() {
SupportedHttpMethods supportedMethods = getResourceInformation(Address.class).getSupportedMethods();
assertThat(supportedMethods.getMethodsFor(COLLECTION), not(hasItem(GET)));
}
/**
* @see DATAREST-217
*/
@Test
@Test // DATAREST-217
public void postIsNotSupportedIfSaveIsNotExported() {
SupportedHttpMethods supportedMethods = getResourceInformation(Address.class).getSupportedMethods();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -91,10 +91,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
configuration.setEnableEnumTranslation(false);
}
/**
* @see DATAREST-230
*/
@Test
@Test // DATAREST-230
public void exposesAlpsCollectionResources() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -105,10 +102,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
.andExpect(jsonPath("$.alps.descriptors[*].name", hasItems("people", "person")));
}
/**
* @see DATAREST-638
*/
@Test
@Test // DATAREST-638
public void verifyThatAlpsIsDefaultProfileFormat() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -120,10 +114,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
}
/**
* @see DATAREST-463
*/
@Test
@Test // DATAREST-463
public void verifyThatAttributesIgnoredDontAppearInAlps() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -138,10 +129,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
.andExpect(jsonPath("$.alps.descriptors[*].descriptors[*].name", not(hasItems("manager", "curator"))));
}
/**
* @see DATAREST-494
*/
@Test
@Test // DATAREST-494
public void linksToJsonSchemaFromRepresentationDescriptor() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -156,10 +144,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
assertThat(href, endsWith("/profile/items"));
}
/**
* @see DATAREST-516
*/
@Test
@Test // DATAREST-516
public void referenceToAssociatedEntityDesciptorPointsToRepresentationDescriptor() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -176,10 +161,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
assertThat(rt, allOf(containsString(ProfileController.PROFILE_ROOT_MAPPING), endsWith("-representation")));
}
/**
* @see DATAREST-630
*/
@Test
@Test // DATAREST-630
public void onlyExposesIdAttributesWhenExposedInTheConfiguration() throws Exception {
Link profileLink = client.discoverUnique("profile");
@@ -190,10 +172,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
.andExpect(jsonPath("$.alps.descriptors[*].descriptors[*].name", hasItems("id", "name")));
}
/**
* @see DATAREST-683
*/
@Test
@Test // DATAREST-683
public void enumValueListingsAreTranslatedIfEnabled() throws Exception {
configuration.setEnableEnumTranslation(true);
@@ -211,10 +190,7 @@ public class AlpsControllerIntegrationTests extends AbstractControllerIntegratio
assertThat(value, is("Male, Female, Undefined"));
}
/**
* @see DATAREST-753
*/
@Test
@Test // DATAREST-753
public void alpsCanHandleGroovyDomainObjects() throws Exception {
Link profileLink = client.discoverUnique("profile");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,10 +64,7 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
}
}
/**
* @see DATAREST-573
*/
@Test
@Test // DATAREST-573
public void appliesSelectiveDefaultCorsConfiguration() throws Exception {
Link findItems = client.discoverUnique("items");
@@ -81,10 +78,7 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS,TRACE"));
}
/**
* @see DATAREST-573
*/
@Test
@Test // DATAREST-573
public void appliesGlobalCorsConfiguration() throws Exception {
Link findBooks = client.discoverUnique("books");
@@ -103,10 +97,9 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
}
/**
* @see DATAREST-573
* @see BooksXmlController
*/
@Test
@Test // DATAREST-573
public void appliesCorsConfigurationOnCustomControllers() throws Exception {
// Preflight request
@@ -128,10 +121,9 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
}
/**
* @see DATAREST-573
* @see BooksPdfController
*/
@Test
@Test // DATAREST-573
public void appliesCorsConfigurationOnCustomControllerMethod() throws Exception {
// Preflight request
@@ -144,10 +136,7 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, containsString("GET,PUT,POST")));
}
/**
* @see DATAREST-573
*/
@Test
@Test // DATAREST-573
public void appliesCorsConfigurationOnRepository() throws Exception {
Link authorsLink = client.discoverUnique("authors");
@@ -162,10 +151,7 @@ public class CorsIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,PATCH"));
}
/**
* @see DATAREST-573
*/
@Test
@Test // DATAREST-573
public void appliesCorsConfigurationOnRepositoryToCustomControllers() throws Exception {
// Preflight request

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,10 +77,7 @@ public class DataRest262Tests {
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
}
/**
* @see DATAREST-262
*/
@Test
@Test // DATAREST-262
public void deserializesNestedAssociation() throws Exception {
Airport airport = repository.save(new Airport());
@@ -90,10 +87,7 @@ public class DataRest262Tests {
assertThat(result.orgOrDstFlightPart.airport.id, is(airport.id));
}
/**
* @see DATAREST-262
*/
@Test
@Test // DATAREST-262
@Ignore
public void serializesLinksToNestedAssociations() throws Exception {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -87,10 +87,7 @@ public class DataRest363Tests {
this.frodo = personRepository.save(new Person("Frodo", "Baggins"));
}
/**
* @see DATAREST-363
*/
@Test
@Test // DATAREST-363
public void testBasics() throws Exception {
ResultActions frodoActions = testMvcClient.follow("/people/".concat(frodo.getId().toString()));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,10 +90,7 @@ public class JpaDefaultPageableWebTests extends AbstractWebIntegrationTests {
super.setUp();
}
/**
* @see DATAREST-906
*/
@Test
@Test // DATAREST-906
public void executesSearchThatTakesAMappedSortProperty() throws Exception {
Link findBySortedLink = client.discoverUnique("books", "search", "find-spring-books-sorted");
@@ -112,10 +109,7 @@ public class JpaDefaultPageableWebTests extends AbstractWebIntegrationTests {
andExpect(jsonPath("$._embedded.books[1].title").doesNotExist());
}
/**
* @see DATAREST-906
*/
@Test
@Test // DATAREST-906
public void shouldApplyDefaultPageable() throws Exception {
mvc.perform(get("/books/default-pageable"))//
@@ -123,10 +117,7 @@ public class JpaDefaultPageableWebTests extends AbstractWebIntegrationTests {
.andExpect(jsonPath("$.size").value(1));
}
/**
* @see DATAREST-906
*/
@Test
@Test // DATAREST-906
public void shouldOverrideDefaultPageable() throws Exception {
mvc.perform(get("/books/default-pageable?size=10"))//

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -115,10 +115,7 @@ public class JpaWebTests extends CommonWebTests {
return map;
}
/**
* @see DATAREST-99
*/
@Test
@Test // DATAREST-99
public void doesNotExposeCreditCardRepository() throws Exception {
mvc.perform(get("/")). //
@@ -143,10 +140,7 @@ public class JpaWebTests extends CommonWebTests {
assertDoesNotHaveLinkWithRel(Link.REL_NEXT, response);
}
/**
* @see DATAREST-169
*/
@Test
@Test // DATAREST-169
public void exposesLinkForRelatedResource() throws Exception {
MockHttpServletResponse response = client.request("/");
@@ -158,10 +152,7 @@ public class JpaWebTests extends CommonWebTests {
assertThat(client.request(creatorLink), is(notNullValue()));
}
/**
* @see DATAREST-200
*/
@Test
@Test // DATAREST-200
public void exposesInlinedEntities() throws Exception {
MockHttpServletResponse response = client.request("/");
@@ -171,10 +162,7 @@ public class JpaWebTests extends CommonWebTests {
assertHasJsonPathValue("$..lineItems", orders);
}
/**
* @see DATAREST-199
*/
@Test
@Test // DATAREST-199
public void createsOrderUsingPut() throws Exception {
mvc.perform(//
@@ -183,10 +171,7 @@ public class JpaWebTests extends CommonWebTests {
).andExpect(status().isCreated());
}
/**
* @see DATAREST-117
*/
@Test
@Test // DATAREST-117
public void createPersonThenVerifyIgnoredAttributesDontExist() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -206,10 +191,7 @@ public class JpaWebTests extends CommonWebTests {
assertJsonPathDoesntExist("$.weight", response);
}
/**
* @see DATAREST-95
*/
@Test
@Test // DATAREST-95
public void createThenPatch() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -233,10 +215,7 @@ public class JpaWebTests extends CommonWebTests {
assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.lastName"), is("Baggins"));
}
/**
* @see DATAREST-150
*/
@Test
@Test // DATAREST-150
public void createThenPut() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -268,10 +247,7 @@ public class JpaWebTests extends CommonWebTests {
assertPersonWithNameAndSiblingLink("Billy Bob");
}
/**
* @see DATAREST-219
*/
@Test
@Test // DATAREST-219
public void manipulatePropertyCollectionRestfullyWithMultiplePosts() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -288,10 +264,7 @@ public class JpaWebTests extends CommonWebTests {
assertSiblingNames(frodosSiblingLink, "Bilbo", "Merry", "Pippin");
}
/**
* @see DATAREST-219
*/
@Test
@Test // DATAREST-219
public void manipulatePropertyCollectionRestfullyWithSinglePost() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -306,10 +279,7 @@ public class JpaWebTests extends CommonWebTests {
assertSiblingNames(frodosSiblingLink, "Bilbo", "Merry", "Pippin");
}
/**
* @see DATAREST-219
*/
@Test
@Test // DATAREST-219
public void manipulatePropertyCollectionRestfullyWithMultiplePuts() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -328,10 +298,7 @@ public class JpaWebTests extends CommonWebTests {
assertSiblingNames(frodosSiblingsLink, "Merry", "Pippin");
}
/**
* @see DATAREST-219
*/
@Test
@Test // DATAREST-219
public void manipulatePropertyCollectionRestfullyWithSinglePut() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -351,10 +318,7 @@ public class JpaWebTests extends CommonWebTests {
assertSiblingNames(frodoSiblingLink, "Merry", "Pippin");
}
/**
* @see DATAREST-219
*/
@Test
@Test // DATAREST-219
public void manipulatePropertyCollectionRestfullyWithDelete() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -374,10 +338,7 @@ public class JpaWebTests extends CommonWebTests {
assertSiblingNames(frodosSiblingsLink, "Bilbo", "Merry");
}
/**
* @see DATAREST-50
*/
@Test
@Test // DATAREST-50
public void propertiesCanHaveNulls() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -394,10 +355,7 @@ public class JpaWebTests extends CommonWebTests {
assertNull(JsonPath.read(responseBody, "$.lastName"));
}
/**
* @see DATAREST-238
*/
@Test
@Test // DATAREST-238
public void putShouldWorkDespiteExistingLinks() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -419,10 +377,7 @@ public class JpaWebTests extends CommonWebTests {
assertJsonPathEquals("$.firstName", "Bilbo", overwrittenResponse);
}
/**
* @see DATAREST-217
*/
@Test
@Test // DATAREST-217
public void doesNotAllowGetToCollectionResourceIfFindAllIsNotExported() throws Exception {
Link link = client.discoverUnique("addresses");
@@ -431,10 +386,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(status().isMethodNotAllowed());
}
/**
* @see DATAREST-217
*/
@Test
@Test // DATAREST-217
public void doesNotAllowPostToCollectionResourceIfSaveIsNotExported() throws Exception {
Link link = client.discoverUnique("addresses");
@@ -447,9 +399,8 @@ public class JpaWebTests extends CommonWebTests {
* Checks, that the server only returns the properties contained in the projection requested.
*
* @see OrderSummary
* @see DATAREST-221
*/
@Test
@Test // DATAREST-221
public void returnsProjectionIfRequested() throws Exception {
Link orders = client.discoverUnique("orders");
@@ -468,18 +419,12 @@ public class JpaWebTests extends CommonWebTests {
assertJsonPathDoesntExist("$.lineItems", response);
}
/**
* @see DATAREST-261
*/
@Test
@Test // DATAREST-261
public void relProviderDetectsCustomizedMapping() {
assertThat(relProvider.getCollectionResourceRelFor(Person.class), is("people"));
}
/**
* @see DATAREST-311
*/
@Test
@Test // DATAREST-311
public void onlyLinksShouldAppearWhenExecuteSearchCompact() throws Exception {
Link peopleLink = client.discoverUnique("people");
@@ -505,10 +450,7 @@ public class JpaWebTests extends CommonWebTests {
assertThat(JsonPath.<JSONArray> read(responseBody, "$.content"), hasSize(0));
}
/**
* @see DATAREST-317
*/
@Test
@Test // DATAREST-317
public void rendersExcerptProjectionsCorrectly() throws Exception {
Link authorsLink = client.discoverUnique("authors");
@@ -531,10 +473,7 @@ public class JpaWebTests extends CommonWebTests {
client.follow(new Link(href)).andExpect(client.hasLinkWithRel("books"));
}
/**
* @see DATAREST-353
*/
@Test
@Test // DATAREST-353
public void returns404WhenTryingToDeleteANonExistingResource() throws Exception {
Link receiptsLink = client.discoverUnique("receipts");
@@ -543,10 +482,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(status().isNotFound());
}
/**
* @see DATAREST-384
*/
@Test
@Test // DATAREST-384
public void exectuesSearchThatTakesASort() throws Exception {
Link booksLink = client.discoverUnique("books");
@@ -569,10 +505,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(client.hasLinkWithRel("self"));
}
/**
* @see DATAREST-160
*/
@Test
@Test // DATAREST-160
public void returnConflictWhenConcurrentlyEditingVersionedEntity() throws Exception {
Link receiptLink = client.discoverUnique("receipts");
@@ -599,10 +532,7 @@ public class JpaWebTests extends CommonWebTests {
.andExpect(status().isPreconditionFailed());
}
/**
* @see DATAREST-423
*/
@Test
@Test // DATAREST-423
public void invokesCustomControllerAndBindsDomainObjectCorrectly() throws Exception {
MockHttpServletResponse authorsResponse = client.request(client.discoverUnique("authors"));
@@ -613,10 +543,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(status().isIAmATeapot());
}
/**
* @see DATAREST-523
*/
@Test
@Test // DATAREST-523
public void augmentsCollectionAssociationUsingPost() throws Exception {
List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), //
@@ -637,10 +564,7 @@ public class JpaWebTests extends CommonWebTests {
}
}
/**
* @see DATAREST-658
*/
@Test
@Test // DATAREST-658
public void returnsLinkHeadersForHeadRequestToItemResource() throws Exception {
MockHttpServletResponse response = client.request(client.discoverUnique("people"));
@@ -655,10 +579,7 @@ public class JpaWebTests extends CommonWebTests {
assertThat(links.hasLink("person"), is(true));
}
/**
* @see DATAREST-883
*/
@Test
@Test // DATAREST-883
public void exectuesSearchThatTakesAMappedSortProperty() throws Exception {
Link findBySortedLink = client.discoverUnique("books", "search", "find-by-sorted");
@@ -679,10 +600,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(client.hasLinkWithRel("self"));
}
/**
* @see DATAREST-883
*/
@Test
@Test // DATAREST-883
public void exectuesCustomQuerySearchThatTakesAMappedSortProperty() throws Exception {
Link findByLink = client.discoverUnique("books", "search", "find-spring-books-sorted");
@@ -702,10 +620,7 @@ public class JpaWebTests extends CommonWebTests {
andExpect(client.hasLinkWithRel("self"));
}
/**
* @see DATAREST-910
*/
@Test
@Test // DATAREST-910
public void callUnmappedCustomRepositoryController() throws Exception {
mvc.perform(post("/orders/search/sort")).andExpect(status().isOk());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,11 +73,7 @@ public class ProfileIntegrationTests extends AbstractControllerIntegrationTests
this.client = new TestMvcClient(mvc, this.discoverers);
}
/**
* @see DATAREST-230
* @see DATAREST-638
*/
@Test
@Test // DATAREST-230, DATAREST-638
public void exposesProfileLink() throws Exception {
client.follow(ROOT_URI)//
@@ -85,11 +81,7 @@ public class ProfileIntegrationTests extends AbstractControllerIntegrationTests
.andExpect(jsonPath("$._links.profile.href", endsWith(ProfileController.PROFILE_ROOT_MAPPING)));
}
/**
* @see DATAREST-230
* @see DATAREST-638
*/
@Test
@Test // DATAREST-230, DATAREST-638
public void profileRootLinkContainsMetadataForEachRepo() throws Exception {
Link profileLink = client.discoverUnique(new Link(ROOT_URI), ProfileResourceProcessor.PROFILE_REL);
@@ -104,10 +96,7 @@ public class ProfileIntegrationTests extends AbstractControllerIntegrationTests
assertThat(client.discoverUnique(profileLink, "addresses", MediaType.ALL), is(notNullValue()));
}
/**
* @see DATAREST-638
*/
@Test
@Test // DATAREST-638
public void profileLinkOnCollectionResourceLeadsToRepositorySpecificMetadata() throws Exception {
Link peopleLink = client.discoverUnique(new Link(ROOT_URI), "people");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import javax.persistence.Id;
*
* @author Greg Turnquist
* @author Oliver Gierke
* @see DATAREST-754
*/
@Entity
public class SimulatedGroovyDomainClass implements GroovyObject {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,5 @@ import org.springframework.data.rest.webmvc.jpa.groovy.SimulatedGroovyDomainClas
* Simulates a repository built on a Groovy domain object.
*
* @author Greg Turnquist
* @see DATAREST-754
*/
public interface SimulatedGroovyDomainClassRepository extends CrudRepository<SimulatedGroovyDomainClass, Long> {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,10 +69,7 @@ public class Jackson2DatatypeHelperIntegrationTests {
em.clear();
}
/**
* @see DATAREST-500
*/
@Test
@Test // DATAREST-500
public void configuresHIbernate4ModuleToLoadLazyLoadingProxies() throws Exception {
PersistentEntity<?, ?> entity = entities.getPersistentEntity(Order.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,10 +126,7 @@ public class PersistentEntitySerializationTests {
assertThat(p.getSiblings(), is(Collections.EMPTY_LIST));
}
/**
* @see DATAREST-238
*/
@Test
@Test // DATAREST-238
public void deserializePersonWithLinks() throws IOException {
String bilbo = "{\n" + " \"_links\" : {\n" + " \"self\" : {\n"
@@ -144,10 +141,7 @@ public class PersistentEntitySerializationTests {
assertThat(p.getLastName(), equalTo("Baggins"));
}
/**
* @see DATAREST-238
*/
@Test
@Test // DATAREST-238
public void serializesPersonEntity() throws IOException, InterruptedException {
PersistentEntity<?, ?> persistentEntity = repositories.getPersistentEntity(Person.class);
@@ -168,10 +162,7 @@ public class PersistentEntitySerializationTests {
assertThat(siblingLink.getHref(), endsWith(new UriTemplate("/{id}/siblings").expand(person.getId()).toString()));
}
/**
* @see DATAREST-248
*/
@Test
@Test // DATAREST-248
public void deserializesPersonWithLinkToOtherPersonCorrectly() throws Exception {
Person father = people.save(new Person("John", "Doe"));
@@ -182,10 +173,7 @@ public class PersistentEntitySerializationTests {
assertThat(result.getFather(), is(father));
}
/**
* @see DATAREST-248
*/
@Test
@Test // DATAREST-248
public void deserializesPersonWithLinkToOtherPersonsCorrectly() throws Exception {
Person firstSibling = people.save(new Person("John", "Doe"));
@@ -198,10 +186,7 @@ public class PersistentEntitySerializationTests {
assertThat(result.getSiblings(), hasItems(firstSibling, secondSibling));
}
/**
* @see DATAREST-248
*/
@Test
@Test // DATAREST-248
public void deserializesEmbeddedAssociationsCorrectly() throws Exception {
String content = TestUtils.readFileFromClasspath("order.json");
@@ -210,10 +195,7 @@ public class PersistentEntitySerializationTests {
assertThat(order.getLineItems(), hasSize(2));
}
/**
* @see DATAREST-250
*/
@Test
@Test // DATAREST-250
public void serializesReferencesWithinPagedResourceCorrectly() throws Exception {
Person creator = new Person("Dave", "Matthews");
@@ -235,10 +217,7 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(result, "$._embedded.orders[*].lineItems"), is(notNullValue()));
}
/**
* @see DATAREST-521
*/
@Test
@Test // DATAREST-521
public void serializesLinksForExcerpts() throws Exception {
Person dave = new Person("Dave", "Matthews");
@@ -261,10 +240,7 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(result, "$._embedded.father[*]._links.self"), is(notNullValue()));
}
/**
* @see DATAREST-521
*/
@Test
@Test // DATAREST-521
public void rendersAdditionalLinksRegisteredWithResource() throws Exception {
Person dave = new Person("Dave", "Matthews");
@@ -280,10 +256,7 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(result, "$._links.processed"), is(notNullValue()));
}
/**
* @see DATAREST-697
*/
@Test
@Test // DATAREST-697
public void rendersProjectionWithinSimpleResourceCorrectly() throws Exception {
Person person = new Person("Dave", "Matthews");
@@ -297,10 +270,7 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(result, "$._links.self"), is(notNullValue()));
}
/**
* @see DATAREST-880
*/
@Test
@Test // DATAREST-880
public void unwrapsNestedTypeCorrectly() throws Exception {
CreditCard creditCard = new CreditCard(new CreditCard.CCN("1234123412341234"));
@@ -308,10 +278,7 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(mapper.writeValueAsString(creditCard), "$.ccn"), is("1234123412341234"));
}
/**
* @see DATAREST-872
*/
@Test
@Test // DATAREST-872
public void serializesInheritance() throws Exception {
Suite suite = new Suite();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,10 +44,7 @@ public class BackendIdConverterHandlerMethodArgumentResolverIntegrationTests
@Autowired BackendIdHandlerMethodArgumentResolver resolver;
/**
* @see DATAREST-155
*/
@Test
@Test // DATAREST-155
public void translatesUriToBackendId() throws Exception {
Method method = ReflectionUtils.findMethod(SampleController.class, "resolveId", Serializable.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,10 +64,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(link.getRel(), is("people"));
}
/**
* @see DATAREST-221
*/
@Test
@Test // DATAREST-221
public void returnsLinkWithProjectionTemplateVariableIfProjectionIsDefined() {
Link link = entityLinks.linkToSingleResource(Order.class, 1);
@@ -76,20 +73,14 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(link.getVariableNames(), hasItem(configuration.getProjectionConfiguration().getParameterName()));
}
/**
* @see DATAREST-155
*/
@Test
@Test // DATAREST-155
public void usesCustomGeneratedBackendId() {
Link link = entityLinks.linkToSingleResource(Book.class, 7L);
assertThat(link.expand().getHref(), endsWith("/7-7-7-7-7-7-7"));
}
/**
* @see DATAREST-317
*/
@Test
@Test // DATAREST-317
public void adaptsToExistingPageable() {
Link link = entityLinks.linkToPagedResource(Person.class, new PageRequest(0, 10));
@@ -99,10 +90,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(link.getVariableNames(), hasItems("sort", "projection"));
}
/**
* @see DATAREST-467
*/
@Test
@Test // DATAREST-467
public void returnsLinksToSearchResources() {
Links links = entityLinks.linksToSearchResources(Person.class);
@@ -114,10 +102,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(firstnameLink.getVariableNames(), hasItems("page", "size"));
}
/**
* @see DATAREST-467
*/
@Test
@Test // DATAREST-467
public void returnsLinkToSearchResource() {
Link link = entityLinks.linkToSearchResource(Person.class, "firstname");
@@ -127,11 +112,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(link.getVariableNames(), hasItems("firstname", "page", "size"));
}
/**
* @see DATAREST-467
* @see DATAREST-519
*/
@Test
@Test // DATAREST-467, DATAREST-519
public void prepopulatesPaginationInformationForSearchResourceLink() {
Link link = entityLinks.linkToSearchResource(Person.class, "firstname", new PageRequest(0, 10));
@@ -145,10 +126,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(components.getQueryParams(), allOf(hasKey("page"), hasKey("size")));
}
/**
* @see DATAREST-467
*/
@Test
@Test // DATAREST-467
public void returnsTemplatedLinkForSortedSearchResource() {
Link link = entityLinks.linkToSearchResource(Person.class, "lastname");
@@ -157,11 +135,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(link.getVariableNames(), hasItems("lastname", "sort"));
}
/**
* @see DATAREST-467
* @see DATAREST-519
*/
@Test
@Test // DATAREST-467, DATAREST-519
public void prepopulatesSortInformationForSearchResourceLink() {
Link link = entityLinks.linkToSearchResource(Person.class, "lastname", new Sort("firstname"));
@@ -175,12 +149,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(components.getQueryParams(), hasKey("sort"));
}
/**
* @see DATAREST-668
* @see DATAREST-519
* @see DATAREST-467
*/
@Test
@Test // DATAREST-668, DATAREST-519, DATAREST-467
public void addsProjectVariableToSearchResourceIfAvailable() {
for (Link link : entityLinks.linksToSearchResources(Book.class)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,13 +29,9 @@ public interface ProfileRepository extends PagingAndSortingRepository<Profile, S
List<Profile> findByType(String type);
/**
* @see DATAREST-247
*/
// DATAREST-247
long countByType(@Param("type") String type);
/**
* @see DATAREST-511
*/
// DATAREST-511
Optional<Profile> findById(@Param("id") String id);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import org.springframework.data.mongodb.core.mapping.Document;
*
* @author Greg Turnquist
* @author Oliver Gierke
* @see DATAREST-754
*/
@Document
public class SimulatedGroovyDomainClass implements GroovyObject {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,5 @@ import org.springframework.data.repository.CrudRepository;
* Simulates a repository built on a Groovy domain object.
*
* @author Greg Turnquist
* @see DATAREST-754
*/
public interface SimulatedGroovyDomainClassRepository extends CrudRepository<SimulatedGroovyDomainClass, String> {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,10 +126,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(jsonPath("$.address.zipCode").value(is(notNullValue())));
}
/**
* @see DATAREST-247
*/
@Test
@Test // DATAREST-247
public void executeQueryMethodWithPrimitiveReturnType() throws Exception {
Link profiles = client.discoverUnique("profiles");
@@ -172,10 +169,7 @@ public class MongoWebTests extends CommonWebTests {
assertThat(JsonPath.read(response.getContentAsString(), "$.address.zipCode"), is((Object) "ZIP"));
}
/**
* @see DATAREST-160
*/
@Test
@Test // DATAREST-160
public void returnConflictWhenConcurrentlyEditingVersionedEntity() throws Exception {
Link receiptLink = client.discoverUnique("receipts");
@@ -202,10 +196,7 @@ public class MongoWebTests extends CommonWebTests {
.andExpect(status().isPreconditionFailed());
}
/**
* @see DATAREST-471
*/
@Test
@Test // DATAREST-471
public void auditableResourceHasLastModifiedHeaderSet() throws Exception {
Profile profile = repository.findAll().iterator().next();
@@ -216,10 +207,7 @@ public class MongoWebTests extends CommonWebTests {
assertThat(header, not(isEmptyOrNullString()));
}
/**
* @see DATAREST-482
*/
@Test
@Test // DATAREST-482
public void putDoesNotRemoveAssociations() throws Exception {
Link usersLink = client.discoverUnique("users");
@@ -242,10 +230,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(jsonPath("$.embedded.users[0].address").doesNotExist());
}
/**
* @see DATAREST-482
*/
@Test
@Test // DATAREST-482
public void emptiesAssociationForEmptyUriList() throws Exception {
Link usersLink = client.discoverUnique("users");
@@ -259,10 +244,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(jsonPath("$").exists());
}
/**
* @see DATAREST-491
*/
@Test
@Test // DATAREST-491
public void updatesMapPropertyCorrectly() throws Exception {
Link profilesLink = client.discoverUnique("profiles");
@@ -276,10 +258,7 @@ public class MongoWebTests extends CommonWebTests {
client.follow(profileLink).andExpect(jsonPath("$.metadata.Key").value("Value"));
}
/**
* @see DATAREST-506
*/
@Test
@Test // DATAREST-506
public void supportsConditionalGetsOnItemResource() throws Exception {
Receipt receipt = new Receipt();
@@ -302,10 +281,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(header().string(ETAG, is(notNullValue())));
}
/**
* @see DATAREST-511
*/
@Test
@Test // DATAREST-511
public void invokesQueryResourceReturningAnOptional() throws Exception {
Profile profile = repository.findAll().iterator().next();
@@ -316,10 +292,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(status().isOk());
}
/**
* @see DATAREST-517
*/
@Test
@Test // DATAREST-517
public void returnsNotFoundIfQueryExecutionDoesNotReturnResult() throws Exception {
Link link = client.discoverUnique("profiles", "search", "findById");
@@ -328,10 +301,7 @@ public class MongoWebTests extends CommonWebTests {
andExpect(status().isNotFound());
}
/**
* @see DATAREST-712
*/
@Test
@Test // DATAREST-712
public void invokesQueryMethodTakingAReferenceCorrectly() throws Exception {
Link link = client.discoverUnique("users", "search", "findByColleaguesContains");
@@ -344,10 +314,7 @@ public class MongoWebTests extends CommonWebTests {
mvc.perform(get(href)).andExpect(status().isOk());
}
/**
* @see DATAREST-835
*/
@Test
@Test // DATAREST-835
public void exposesETagHeaderForSearchResourceYieldingItemResource() throws Exception {
Link link = client.discoverUnique("profiles", "search", "findById");
@@ -359,10 +326,7 @@ public class MongoWebTests extends CommonWebTests {
.andExpect(header().string("Last-Modified", is(notNullValue())));
}
/**
* @see DATAREST-835
*/
@Test
@Test // DATAREST-835
public void doesNotAddETagHeaderForCollectionQueryResource() throws Exception {
Link link = client.discoverUnique("profiles", "search", "findByType");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,10 +57,7 @@ public class PersistentEntityResourceAssemblerIntegrationTests extends AbstractC
@Autowired @Qualifier("objectMapper") ObjectMapper objectMapper;
@Autowired Associations associations;
/**
* @see DATAREST-609
*/
@Test
@Test // DATAREST-609
public void addsSelfAndSingleResourceLinkToResourceByDefault() throws Exception {
Projector projector = mock(Projector.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,10 +39,7 @@ public class RepositoryRestHandlerMappingIntegrationTests extends AbstractContro
@Autowired DelegatingHandlerMapping mapping;
/**
* @see DATAREST-617
*/
@Test
@Test // DATAREST-617
public void usesMethodsWithoutProducesClauseForGeneralJsonRequests() throws Exception {
MockHttpServletRequest mockRequest = new MockHttpServletRequest("GET", "/users");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,10 +79,7 @@ public class JsonPatchHandlerUnitTests {
this.user.address = address;
}
/**
* @see DATAREST-348
*/
@Test
@Test // DATAREST-348
public void appliesRemoveOperationCorrectly() throws Exception {
String input = "[{ \"op\": \"replace\", \"path\": \"/address/zipCode\", \"value\": \"ZIP\" },"
@@ -94,10 +91,7 @@ public class JsonPatchHandlerUnitTests {
assertThat(result.address.zipCode, is("ZIP"));
}
/**
* @see DATAREST-348
*/
@Test
@Test // DATAREST-348
public void appliesMergePatchCorrectly() throws Exception {
String input = "{ \"address\" : { \"zipCode\" : \"ZIP\"}, \"lastname\" : null }";
@@ -130,10 +124,7 @@ public class JsonPatchHandlerUnitTests {
assertThat(user.colleagues.get(0).firstname, is(christoph.firstname));
}
/**
* @see DATAREST-609
*/
@Test
@Test // DATAREST-609
public void hintsToMediaTypeIfBodyCantBeRead() throws Exception {
exception.expect(HttpMessageNotReadableException.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,10 +48,7 @@ public class LegacyRepresentationConfigIntegrationTests extends AbstractReposito
}
}
/**
* @see DATAREST-213, DATAREST-617
*/
@Test
@Test // DATAREST-213, DATAREST-617
public void returnsJsonIfConfiguredAndRequested() throws Exception {
for (String resource : Arrays.asList("/", "/users")) {
@@ -61,10 +58,7 @@ public class LegacyRepresentationConfigIntegrationTests extends AbstractReposito
}
}
/**
* @see DATAREST-213, DATAREST-617
*/
@Test
@Test // DATAREST-213, DATAREST-617
public void returnsJsonIfConfigured() throws Exception {
for (String resource : Arrays.asList("/", "/users")) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,10 +80,7 @@ public class QuerydslAwareRootResourceInformationHandlerMethodArgumentResolverUn
when(parameter.hasParameterAnnotation(QuerydslPredicate.class)).thenReturn(true);
}
/**
* @see DATAREST-616
*/
@Test
@Test // DATAREST-616
public void returnsInvokerIfRepositoryIsNotQuerydslAware() {
ReceiptRepository repository = mock(ReceiptRepository.class);
@@ -94,10 +91,7 @@ public class QuerydslAwareRootResourceInformationHandlerMethodArgumentResolverUn
assertThat(result, is(invoker));
}
/**
* @see DATAREST-616
*/
@Test
@Test // DATAREST-616
public void wrapsInvokerInQuerydslAdapter() {
Object repository = mock(QuerydslUserRepository.class);
@@ -108,10 +102,7 @@ public class QuerydslAwareRootResourceInformationHandlerMethodArgumentResolverUn
assertThat(result, is(instanceOf(QuerydslRepositoryInvokerAdapter.class)));
}
/**
* @see DATAREST-616
*/
@Test
@Test // DATAREST-616
public void invokesCustomizationOnRepositoryIfItImplementsCustomizer() {
QuerydslCustomizingUserRepository repository = mock(QuerydslCustomizingUserRepository.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -96,10 +96,7 @@ public class PersistentEntitySerializationTests {
this.projectionFactory = new SpelAwareProxyProjectionFactory();
}
/**
* @see DATAREST-250
*/
@Test
@Test // DATAREST-250
public void serializesEmbeddedReferencesCorrectly() throws Exception {
User user = new User();
@@ -119,18 +116,12 @@ public class PersistentEntitySerializationTests {
assertThat(JsonPath.read(result, "$._embedded.users[*].address"), is(notNullValue()));
}
/**
* @see DATAREST-654
*/
@Test
@Test // DATAREST-654
public void deserializesTranslatedEnumProperty() throws Exception {
assertThat(mapper.readValue("{ \"gender\" : \"Male\" }", User.class).gender, is(Gender.MALE));
}
/**
* @see DATAREST-864
*/
@Test
@Test // DATAREST-864
public void createsNestedResourceForMap() throws Exception {
User dave = users.save(new User());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,10 +95,7 @@ public class PersistentEntityToJsonSchemaConverterUnitTests {
customizerFactory);
}
/**
* @see DATAREST-631, DATAREST-632
*/
@Test
@Test // DATAREST-631, DATAREST-632
public void fulfillsConstraintsForProfile() {
List<Constraint> constraints = new ArrayList<Constraint>();
@@ -111,10 +108,7 @@ public class PersistentEntityToJsonSchemaConverterUnitTests {
assertConstraints(Profile.class, constraints);
}
/**
* @see DATAREST-632
*/
@Test
@Test // DATAREST-632
public void fulfillsConstraintsForUser() throws Exception {
List<Constraint> constraints = new ArrayList<Constraint>();
@@ -166,10 +160,7 @@ public class PersistentEntityToJsonSchemaConverterUnitTests {
assertConstraints(User.class, constraints);
}
/**
* @see DATAREST-754
*/
@Test
@Test // DATAREST-754
public void handlesGroovyDomainObjects() {
List<Constraint> constraints = new ArrayList<Constraint>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,10 +39,7 @@ public class RepositoryLinkBuildUnitTests {
MongoMappingContext context = new MongoMappingContext();
/**
* @see DATAREST-292
*/
@Test
@Test // DATAREST-292
public void usesCurrentRequestsUriBaseForRelativeBaseUri() {
TestMvcClient.initWebTest();
@@ -50,10 +47,7 @@ public class RepositoryLinkBuildUnitTests {
assertRootUriFor("api", "http://localhost/api/profile");
}
/**
* @see DATAREST-292, DATAREST-296
*/
@Test
@Test // DATAREST-292, DATAREST-296
public void usesBaseUriOnlyIfItIsAbsolute() {
assertRootUriFor("http://foobar/api", "http://foobar/api/profile");
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,10 +95,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
build();
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deletePersonAccessDeniedForNoCredentials() throws Exception {
// Getting the collection is not tested here. This is to get the URI that will later be tested for DELETE
@@ -117,10 +114,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
mvc.perform(delete(href)).andExpect(status().isUnauthorized());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deletePersonAccessDeniedForUsers() throws Exception {
MockHttpServletResponse response = mvc
@@ -137,10 +131,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
andExpect(status().isForbidden());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deletePersonAccessGrantedForAdmins() throws Exception {
MockHttpServletResponse response = mvc
@@ -157,20 +148,14 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(status().is(HttpStatus.NO_CONTENT.value()));
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllPeopleAccessDeniedForNoCredentials() throws Throwable {
mvc.perform(get(client.discoverUnique("people").expand().getHref())).//
andExpect(status().isUnauthorized());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllPeopleAccessGrantedForUsers() throws Throwable {
mvc.perform(get(client.discoverUnique("people").expand().getHref()).//
@@ -178,10 +163,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
andExpect(status().isOk());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllPeopleAccessGrantedForAdmins() throws Throwable {
mvc.perform(get(client.discoverUnique("people").expand().getHref()).//
@@ -189,10 +171,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
andExpect(status().isOk());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deleteOrderAccessDeniedForNoCredentials() throws Exception {
// Getting the collection is not tested here. This is to get the URI that will later be tested for DELETE
@@ -209,10 +188,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
mvc.perform(delete(href)).andExpect(status().isUnauthorized());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deleteOrderAccessDeniedForUsers() throws Exception {
MockHttpServletResponse response = mvc
@@ -226,10 +202,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
andExpect(status().isForbidden());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void deleteOrderAccessGrantedForAdmins() throws Exception {
MockHttpServletResponse response = mvc
@@ -246,20 +219,14 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(status().is(HttpStatus.NO_CONTENT.value()));
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllOrdersAccessDeniedForNoCredentials() throws Throwable {
mvc.perform(get(client.discoverUnique("orders").expand().getHref())).//
andExpect(status().isUnauthorized());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllOrdersAccessGrantedForUsers() throws Throwable {
mvc.perform(get(client.discoverUnique("orders").expand().getHref()).//
@@ -267,10 +234,7 @@ public class SecurityIntegrationTests extends AbstractWebIntegrationTests {
andExpect(status().isOk());
}
/**
* @see DATAREST-327
*/
@Test
@Test // DATAREST-327
public void findAllOrdersAccessGrantedForAdmins() throws Throwable {
mvc.perform(get(client.discoverUnique("orders").expand().getHref()).//

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,10 +62,7 @@ public class ShopIntegrationTests extends AbstractWebIntegrationTests {
expectRelatedResource("customer", actions);
}
/**
* @see DATAREST-221
*/
@Test
@Test // DATAREST-221
public void renderProductNameOnlyProjection() throws Exception {
Map<String, Object> arguments = Collections.singletonMap("projection", "nameOnly");
@@ -76,10 +73,7 @@ public class ShopIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(jsonPath("$._embedded.products[0].price").doesNotExist());
}
/**
* @see DATAREST-221
*/
@Test
@Test // DATAREST-221
public void renderProductNameOnlyProjectionResourceProcessor() throws Exception {
Map<String, Object> arguments = Collections.singletonMap("projection", "nameOnly");
@@ -89,10 +83,7 @@ public class ShopIntegrationTests extends AbstractWebIntegrationTests {
.andExpect(jsonPath("$._embedded.products[0]._links.beta").exists());
}
/**
* @see DATAREST-221
*/
@Test
@Test // DATAREST-221
public void renderOrderItemsOnlyProjectionResourceProcessor() throws Exception {
Map<String, Object> arguments = Collections.singletonMap("projection", "itemsOnly");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,10 +77,7 @@ public class SolrWebTests extends CommonWebTests {
repo.deleteAll();
}
/**
* @see DATAREST-387
*/
@Test
@Test // DATAREST-387
public void allowsPaginationThroughData() throws Exception {
MockHttpServletResponse response = client.request("/products?page=0&size=1");
@@ -97,18 +94,12 @@ public class SolrWebTests extends CommonWebTests {
assertDoesNotHaveLinkWithRel(Link.REL_NEXT, response);
}
/**
* @see DATAREST-387
*/
@Test
@Test // DATAREST-387
public void allowsRetrievingDataById() throws Exception {
requestAndCompare(PLAYSTATION);
}
/**
* @see DATAREST-387
*/
@Test
@Test // DATAREST-387
public void createsEntitesCorrectly() throws Exception {
Product product = new Product("4", "iWatch", "trends", "scary");
@@ -120,10 +111,7 @@ public class SolrWebTests extends CommonWebTests {
assertJsonDocumentMatches(product);
}
/**
* @see DATAREST-387
*/
@Test
@Test // DATAREST-387
public void deletesEntitiesCorrectly() throws Exception {
deleteAndVerify(new Link("/products/1"));
}