diff --git a/build.gradle.kts b/build.gradle.kts index 24df89a..20bcb2e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,7 +34,6 @@ dependencies { compileOnly("org.projectlombok:lombok") developmentOnly("org.springframework.boot:spring-boot-devtools") runtimeOnly("org.postgresql:postgresql") - runtimeOnly("io.micrometer:micrometer-registry-prometheus") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") annotationProcessor("org.projectlombok:lombok") testImplementation("org.springframework.boot:spring-boot-starter-test") diff --git a/src/test/java/snackscription/review/service/ReviewServiceTest.java b/src/test/java/snackscription/review/service/ReviewServiceTest.java index 65a0ff8..edd0b7a 100644 --- a/src/test/java/snackscription/review/service/ReviewServiceTest.java +++ b/src/test/java/snackscription/review/service/ReviewServiceTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; @@ -59,7 +60,7 @@ public void setUp() { @Test - public void testGetSubsboxReview() throws Exception { + public void testGetSubsboxReview() throws Exception { String subscriptionBoxId = this.reviews.getFirst().getSubsbox(); List curReviews = new ArrayList<>(); for (Review review : this.reviews) { @@ -68,7 +69,6 @@ public void testGetSubsboxReview() throws Exception { } } - when(reviewRepo.findByIdSubsbox(subscriptionBoxId)).thenReturn(curReviews); when(reviewRepo.findByIdSubsbox(subscriptionBoxId)).thenReturn(curReviews); List foundReviews = reviewService.getSubsboxReview(subscriptionBoxId, null); @@ -78,7 +78,7 @@ public void testGetSubsboxReview() throws Exception { verify(reviewRepo).findByIdSubsbox(subscriptionBoxId); } - @Test + @Test public void testGetSubsboxReviewNotFound() throws Exception { String subscriptionBoxId = "nonexistent_subsbox_id"; @@ -87,13 +87,13 @@ public void testGetSubsboxReviewNotFound() throws Exception { List foundReviews = reviewService.getSubsboxReview(subscriptionBoxId, null); assertNotNull(foundReviews); - assertEquals(0, foundReviews.size()); + assertEquals(0, foundReviews.size()); verify(reviewRepo).findByIdSubsbox(subscriptionBoxId); } @Test - public void testGetSubsboxReviewApproved() throws Exception { + public void testGetSubsboxReviewApproved() throws Exception { String subscriptionBoxId = this.reviews.getFirst().getSubsbox(); List cuReviews = new ArrayList<>();