From bce765b9594cc38ffaff6fec1d68af379e68ee4f Mon Sep 17 00:00:00 2001 From: Elmar Mammadov Date: Wed, 20 Jul 2022 20:47:28 +0200 Subject: [PATCH] BAEL-5545: fixed formatting issue --- .../jdbc/batch/SpringJdbcBatchPerformanceApplication.java | 1 + .../spring/jdbc/batch/service/ProductServiceUnitTest.java | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/persistence-modules/spring-jdbc-batch/src/main/java/com/baeldung/spring/jdbc/batch/SpringJdbcBatchPerformanceApplication.java b/persistence-modules/spring-jdbc-batch/src/main/java/com/baeldung/spring/jdbc/batch/SpringJdbcBatchPerformanceApplication.java index aef2100de8..008bf55024 100644 --- a/persistence-modules/spring-jdbc-batch/src/main/java/com/baeldung/spring/jdbc/batch/SpringJdbcBatchPerformanceApplication.java +++ b/persistence-modules/spring-jdbc-batch/src/main/java/com/baeldung/spring/jdbc/batch/SpringJdbcBatchPerformanceApplication.java @@ -1,6 +1,7 @@ package com.baeldung.spring.jdbc.batch; import com.baeldung.spring.jdbc.batch.service.ProductService; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.CommandLineRunner; diff --git a/persistence-modules/spring-jdbc-batch/src/test/java/com/baeldung/spring/jdbc/batch/service/ProductServiceUnitTest.java b/persistence-modules/spring-jdbc-batch/src/test/java/com/baeldung/spring/jdbc/batch/service/ProductServiceUnitTest.java index 12a0e70c1b..26a5f64dc0 100644 --- a/persistence-modules/spring-jdbc-batch/src/test/java/com/baeldung/spring/jdbc/batch/service/ProductServiceUnitTest.java +++ b/persistence-modules/spring-jdbc-batch/src/test/java/com/baeldung/spring/jdbc/batch/service/ProductServiceUnitTest.java @@ -2,6 +2,7 @@ package com.baeldung.spring.jdbc.batch.service; import com.baeldung.spring.jdbc.batch.model.Product; import com.baeldung.spring.jdbc.batch.repo.ProductRepository; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -36,7 +37,6 @@ class ProductServiceUnitTest { @Captor ArgumentCaptor> proArgumentCaptor; - @BeforeEach void setUp() { this.productRepository = mock(ProductRepository.class); @@ -45,7 +45,6 @@ class ProductServiceUnitTest { this.productService = new ProductService(this.productRepository, this.random, this.clock); } - @Test void testWhenCreateProductsThenShouldSaveAndReturnElapsedTime() { when(random.nextInt(4)) @@ -58,10 +57,8 @@ class ProductServiceUnitTest { when(clock.millis()) .thenReturn(100L,500L); - final long actualElapsedTime = productService.createProducts(2); - assertThat(actualElapsedTime) .isEqualTo(400L);