@@ -57,7 +57,8 @@ void returnsBrandInfo_whenBrandExists() {
5757
5858 // act
5959 ParameterizedTypeReference <ApiResponse <BrandV1Dto .BrandResponse >> responseType =
60- new ParameterizedTypeReference <>() {};
60+ new ParameterizedTypeReference <>() {
61+ };
6162 ResponseEntity <ApiResponse <BrandV1Dto .BrandResponse >> response =
6263 testRestTemplate .exchange (
6364 ENDPOINT_GET_BRAND + "/" + brand .getId (),
@@ -82,7 +83,8 @@ void returnsBrandInfo_whenBrandExists() {
8283 void returnsNotFound_whenBrandDoesNotExist () {
8384 // act
8485 ParameterizedTypeReference <ApiResponse <BrandV1Dto .BrandResponse >> responseType =
85- new ParameterizedTypeReference <>() {};
86+ new ParameterizedTypeReference <>() {
87+ };
8688 ResponseEntity <ApiResponse <BrandV1Dto .BrandResponse >> response =
8789 testRestTemplate .exchange (
8890 ENDPOINT_GET_BRAND + "/99999" ,
@@ -108,7 +110,8 @@ void returnsCorrectBrand_whenMultipleBrandsExist() {
108110
109111 // act
110112 ParameterizedTypeReference <ApiResponse <BrandV1Dto .BrandResponse >> responseType =
111- new ParameterizedTypeReference <>() {};
113+ new ParameterizedTypeReference <>() {
114+ };
112115 ResponseEntity <ApiResponse <BrandV1Dto .BrandResponse >> response =
113116 testRestTemplate .exchange (
114117 ENDPOINT_GET_BRAND + "/" + adidas .getId (),
@@ -120,6 +123,8 @@ void returnsCorrectBrand_whenMultipleBrandsExist() {
120123 // assert
121124 assertAll (
122125 () -> assertTrue (response .getStatusCode ().is2xxSuccessful ()),
126+ () -> assertThat (response .getBody ()).isNotNull (),
127+ () -> assertThat (response .getBody ().data ()).isNotNull (),
123128 () -> assertThat (response .getBody ().data ().name ()).isEqualTo ("Adidas" )
124129 );
125130 }
0 commit comments