diff --git a/web/pom.xml b/web/pom.xml
index 400fec4..cbf0a38 100644
--- a/web/pom.xml
+++ b/web/pom.xml
@@ -73,4 +73,4 @@
test
-
\ No newline at end of file
+
diff --git a/web/src/test/java/com/demo/web/controller/impl/ProductControllerTest.java b/web/src/test/java/com/demo/web/controller/impl/ProductControllerTest.java
index 0949a60..910e448 100644
--- a/web/src/test/java/com/demo/web/controller/impl/ProductControllerTest.java
+++ b/web/src/test/java/com/demo/web/controller/impl/ProductControllerTest.java
@@ -49,6 +49,8 @@ public class ProductControllerTest {
@Mock
private ProductModelAssembler productModelAssemblerMock;
+ private final Function addApiLinkToProduct = productId -> WebMvcLinkBuilder.linkTo(methodOn(ProductController.class).getProduct(productId)).withSelfRel();
+
private ProductController undertest;
@BeforeClass
@@ -229,6 +231,4 @@ private Object[][] negativeCaseProductIdsDataProvider() {
{0L}, {-1L}, {null}
};
}
-
- private final Function addApiLinkToProduct = productId -> WebMvcLinkBuilder.linkTo(methodOn(ProductController.class).getProduct(productId)).withSelfRel();
-}
\ No newline at end of file
+}
diff --git a/web/src/test/java/com/demo/web/controller/impl/UserControllerTest.java b/web/src/test/java/com/demo/web/controller/impl/UserControllerTest.java
index 277aeb4..ad52984 100644
--- a/web/src/test/java/com/demo/web/controller/impl/UserControllerTest.java
+++ b/web/src/test/java/com/demo/web/controller/impl/UserControllerTest.java
@@ -64,6 +64,16 @@ public class UserControllerTest {
@Mock
private KafkaProducer kafkaProducerMock;
+ private final Function addApiLinkToUser = userName -> WebMvcLinkBuilder.linkTo(methodOn(UserController.class).getUser(userName)).withSelfRel();
+
+ private final Function verifyKafkaProducerSendingEventWithReason = changeReason -> {
+ final ArgumentCaptor valueCapture = getArgumentCaptorForKafkaEvent();
+
+ verify(kafkaProducerMock).sendUserChangeEvent(any(), valueCapture.capture());
+ assertEquals(valueCapture.getValue().getChangeReason(), changeReason);
+ return null;
+ };
+
private UserController undertest;
@BeforeClass
@@ -266,17 +276,7 @@ private Object[][] negativeCaseUserIdsDataProvider() {
};
}
- private final Function addApiLinkToUser = userName -> WebMvcLinkBuilder.linkTo(methodOn(UserController.class).getUser(userName)).withSelfRel();
-
private ArgumentCaptor getArgumentCaptorForKafkaEvent() {
return ArgumentCaptor.forClass(UserOperationNotificationEvent.class);
}
-
- private final Function verifyKafkaProducerSendingEventWithReason = changeReason -> {
- final ArgumentCaptor valueCapture = getArgumentCaptorForKafkaEvent();
-
- verify(kafkaProducerMock).sendUserChangeEvent(any(), valueCapture.capture());
- assertEquals(valueCapture.getValue().getChangeReason(), changeReason);
- return null;
- };
}