diff --git a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java
index 7697fc367..c6aec8bef 100644
--- a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java
+++ b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java
@@ -74,7 +74,7 @@ class ConfigureForDosVisitorTest {
@BeforeEach
@AfterEach
- public void clearLoggers() {
+ void clearLoggers() {
TestLoggerFactory.clear();
}
}
diff --git a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java
index 4e887b222..587b82911 100644
--- a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java
+++ b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java
@@ -44,7 +44,7 @@ class ConfigureForUnixVisitorTest {
@BeforeEach
@AfterEach
- public void clearLoggers() {
+ void clearLoggers() {
TestLoggerFactory.clear();
}
diff --git a/adapter/src/test/java/com/iluwatar/adapter/AdapterPatternTest.java b/adapter/src/test/java/com/iluwatar/adapter/AdapterPatternTest.java
index 1aa5f90c8..5d5c2a081 100644
--- a/adapter/src/test/java/com/iluwatar/adapter/AdapterPatternTest.java
+++ b/adapter/src/test/java/com/iluwatar/adapter/AdapterPatternTest.java
@@ -48,7 +48,7 @@ class AdapterPatternTest {
* This method runs before the test execution and sets the bean objects in the beans Map.
*/
@BeforeEach
- public void setup() {
+ void setup() {
beans = new HashMap<>();
var fishingBoatAdapter = spy(new FishingBoatAdapter());
diff --git a/aggregator-microservices/aggregator-service/src/test/java/com/iluwatar/aggregator/microservices/AggregatorTest.java b/aggregator-microservices/aggregator-service/src/test/java/com/iluwatar/aggregator/microservices/AggregatorTest.java
index 5630a18d1..2ac246d9f 100644
--- a/aggregator-microservices/aggregator-service/src/test/java/com/iluwatar/aggregator/microservices/AggregatorTest.java
+++ b/aggregator-microservices/aggregator-service/src/test/java/com/iluwatar/aggregator/microservices/AggregatorTest.java
@@ -48,7 +48,7 @@ class AggregatorTest {
private ProductInventoryClient inventoryClient;
@BeforeEach
- public void setup() {
+ void setup() {
MockitoAnnotations.openMocks(this);
}
diff --git a/api-gateway/api-gateway-service/src/test/java/com/iluwatar/api/gateway/ApiGatewayTest.java b/api-gateway/api-gateway-service/src/test/java/com/iluwatar/api/gateway/ApiGatewayTest.java
index 0ae43e8dd..0f1fa938e 100644
--- a/api-gateway/api-gateway-service/src/test/java/com/iluwatar/api/gateway/ApiGatewayTest.java
+++ b/api-gateway/api-gateway-service/src/test/java/com/iluwatar/api/gateway/ApiGatewayTest.java
@@ -48,7 +48,7 @@ class ApiGatewayTest {
private PriceClient priceClient;
@BeforeEach
- public void setup() {
+ void setup() {
MockitoAnnotations.openMocks(this);
}
diff --git a/business-delegate/src/test/java/com/iluwatar/business/delegate/BusinessDelegateTest.java b/business-delegate/src/test/java/com/iluwatar/business/delegate/BusinessDelegateTest.java
index 351001ceb..8e8c8eddc 100644
--- a/business-delegate/src/test/java/com/iluwatar/business/delegate/BusinessDelegateTest.java
+++ b/business-delegate/src/test/java/com/iluwatar/business/delegate/BusinessDelegateTest.java
@@ -49,7 +49,7 @@ class BusinessDelegateTest {
* execution of every test.
*/
@BeforeEach
- public void setup() {
+ void setup() {
netflixService = spy(new NetflixService());
youTubeService = spy(new YouTubeService());
diff --git a/caching/src/test/java/com/iluwatar/caching/CachingTest.java b/caching/src/test/java/com/iluwatar/caching/CachingTest.java
index 41c220420..0bcb83897 100644
--- a/caching/src/test/java/com/iluwatar/caching/CachingTest.java
+++ b/caching/src/test/java/com/iluwatar/caching/CachingTest.java
@@ -39,7 +39,7 @@ class CachingTest {
* Setup of application test includes: initializing DB connection and cache size/capacity.
*/
@BeforeEach
- public void setUp() {
+ void setUp() {
// VirtualDB (instead of MongoDB) was used in running the JUnit tests
// to avoid Maven compilation errors. Set flag to true to run the
// tests with MongoDB (provided that MongoDB is installed and socket
diff --git a/callback/src/test/java/com/iluwatar/callback/CallbackTest.java b/callback/src/test/java/com/iluwatar/callback/CallbackTest.java
index 83a5aad5a..d8dab98e6 100644
--- a/callback/src/test/java/com/iluwatar/callback/CallbackTest.java
+++ b/callback/src/test/java/com/iluwatar/callback/CallbackTest.java
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
*
* Could be done with mock objects as well where the call method call is verified.
*/
-public class CallbackTest {
+class CallbackTest {
private Integer callingCount = 0;
diff --git a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/AppTest.java b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/AppTest.java
index b5aeb2ac9..8502ce0af 100644
--- a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/AppTest.java
+++ b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/AppTest.java
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
/**
* App Test showing usage of circuit breaker.
*/
-public class AppTest {
+class AppTest {
private static final Logger LOGGER = LoggerFactory.getLogger(AppTest.class);
@@ -60,7 +60,7 @@ public class AppTest {
* and retry time period of 2 seconds.
*/
@BeforeEach
- public void setupCircuitBreakers() {
+ void setupCircuitBreakers() {
var delayedService = new DelayedRemoteService(System.nanoTime(), STARTUP_DELAY);
//Set the circuit Breaker parameters
delayedServiceCircuitBreaker = new DefaultCircuitBreaker(delayedService, 3000,
@@ -78,7 +78,7 @@ public class AppTest {
}
@Test
- public void testFailure_OpenStateTransition() {
+ void testFailure_OpenStateTransition() {
//Calling delayed service, which will be unhealthy till 4 seconds
assertEquals("Delayed service is down", monitoringService.delayedServiceResponse());
//As failure threshold is "1", the circuit breaker is changed to OPEN
@@ -93,7 +93,7 @@ public class AppTest {
}
@Test
- public void testFailure_HalfOpenStateTransition() {
+ void testFailure_HalfOpenStateTransition() {
//Calling delayed service, which will be unhealthy till 4 seconds
assertEquals("Delayed service is down", monitoringService.delayedServiceResponse());
//As failure threshold is "1", the circuit breaker is changed to OPEN
@@ -112,7 +112,7 @@ public class AppTest {
}
@Test
- public void testRecovery_ClosedStateTransition() {
+ void testRecovery_ClosedStateTransition() {
//Calling delayed service, which will be unhealthy till 4 seconds
assertEquals("Delayed service is down", monitoringService.delayedServiceResponse());
//As failure threshold is "1", the circuit breaker is changed to OPEN
diff --git a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DefaultCircuitBreakerTest.java b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DefaultCircuitBreakerTest.java
index 2e19456a5..817a1e7d0 100644
--- a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DefaultCircuitBreakerTest.java
+++ b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DefaultCircuitBreakerTest.java
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
/**
* Circuit Breaker test
*/
-public class DefaultCircuitBreakerTest {
+class DefaultCircuitBreakerTest {
//long timeout, int failureThreshold, long retryTimePeriod
@Test
diff --git a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DelayedRemoteServiceTest.java b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DelayedRemoteServiceTest.java
index 23215da88..5fe3cdc48 100644
--- a/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DelayedRemoteServiceTest.java
+++ b/circuit-breaker/src/test/java/com/iluwatar/circuitbreaker/DelayedRemoteServiceTest.java
@@ -53,7 +53,7 @@ class DelayedRemoteServiceTest {
* @throws RemoteServiceException
*/
@Test
- public void testParameterizedConstructor() throws RemoteServiceException {
+ void testParameterizedConstructor() throws RemoteServiceException {
var obj = new DelayedRemoteService(System.nanoTime()-2000*1000*1000,1);
assertEquals("Delayed service is working",obj.call());
}
diff --git a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/consumer/callcostprocessor/functions/UsageCostProcessorFunctionTest.java b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/consumer/callcostprocessor/functions/UsageCostProcessorFunctionTest.java
index 3beb01ea4..fc1683768 100644
--- a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/consumer/callcostprocessor/functions/UsageCostProcessorFunctionTest.java
+++ b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/consumer/callcostprocessor/functions/UsageCostProcessorFunctionTest.java
@@ -58,7 +58,7 @@ import static org.mockito.Mockito.*;
* Unit test for Function class.
*/
@ExtendWith(MockitoExtension.class)
-public class UsageCostProcessorFunctionTest {
+class UsageCostProcessorFunctionTest {
@Mock
MessageHandlerUtility mockMessageHandlerUtilityForUsageADetail;
@@ -74,7 +74,7 @@ public class UsageCostProcessorFunctionTest {
UsageCostProcessorFunction usageCostProcessorFunction;
@BeforeEach
- public void setUp() {
+ void setUp() {
var messageBodyUsageDetail = new MessageBody();
var usageDetailsList = new ArrayList();
@@ -122,7 +122,7 @@ public class UsageCostProcessorFunctionTest {
* Unit test for HttpTriggerJava method.
*/
@Test
- public void shouldTriggerHttpAzureFunctionJavaWithSubscriptionValidationEventType() throws Exception {
+ void shouldTriggerHttpAzureFunctionJavaWithSubscriptionValidationEventType() throws Exception {
// Setup
@SuppressWarnings("unchecked")
@@ -148,7 +148,7 @@ public class UsageCostProcessorFunctionTest {
}
@Test
- public void shouldTriggerHttpAzureFunctionJavaWithUsageDetailEventType() throws Exception {
+ void shouldTriggerHttpAzureFunctionJavaWithUsageDetailEventType() throws Exception {
// Setup
@SuppressWarnings("unchecked")
final HttpRequestMessage> req = mock(HttpRequestMessage.class);
diff --git a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/producer/calldetails/functions/UsageDetailPublisherFunctionTest.java b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/producer/calldetails/functions/UsageDetailPublisherFunctionTest.java
index 6533ea357..c44e23b35 100644
--- a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/producer/calldetails/functions/UsageDetailPublisherFunctionTest.java
+++ b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/producer/calldetails/functions/UsageDetailPublisherFunctionTest.java
@@ -52,7 +52,7 @@ import static org.mockito.Mockito.*;
* Unit test for Function class.
*/
@ExtendWith(MockitoExtension.class)
-public class UsageDetailPublisherFunctionTest {
+class UsageDetailPublisherFunctionTest {
@Mock
MessageHandlerUtility mockMessageHandlerUtility;
@Mock
@@ -65,7 +65,7 @@ public class UsageDetailPublisherFunctionTest {
* Unit test for HttpTriggerJava method.
*/
@Test
- public void shouldTriggerHttpAzureFunctionJavaWithSubscriptionValidationEventType() throws Exception {
+ void shouldTriggerHttpAzureFunctionJavaWithSubscriptionValidationEventType() throws Exception {
// Setup
@SuppressWarnings("unchecked")
@@ -91,7 +91,7 @@ public class UsageDetailPublisherFunctionTest {
}
@Test
- public void shouldTriggerHttpAzureFunctionJavaWithUsageDetailEventType() throws Exception {
+ void shouldTriggerHttpAzureFunctionJavaWithUsageDetailEventType() throws Exception {
// Setup
@SuppressWarnings("unchecked")
diff --git a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/EventHandlerUtilityTest.java b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/EventHandlerUtilityTest.java
index 9e34ec533..69e63241f 100644
--- a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/EventHandlerUtilityTest.java
+++ b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/EventHandlerUtilityTest.java
@@ -40,7 +40,7 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
-public class EventHandlerUtilityTest {
+class EventHandlerUtilityTest {
@Mock
EventGridPublisherClient mockCustomEventClient;
@@ -49,7 +49,7 @@ public class EventHandlerUtilityTest {
EventHandlerUtility> eventHandlerUtility;
@BeforeEach
- public void setUp() {
+ void setUp() {
System.setProperty("EventGridURL", "https://www.dummyEndpoint.com/api/events");
System.setProperty("EventGridKey", "EventGridURL");
diff --git a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/MessageHandlerUtilityTest.java b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/MessageHandlerUtilityTest.java
index 0230406bc..7bfc08b89 100644
--- a/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/MessageHandlerUtilityTest.java
+++ b/cloud-claim-check-pattern/call-usage-app/src/test/java/com/iluwatar/claimcheckpattern/utility/MessageHandlerUtilityTest.java
@@ -46,7 +46,7 @@ import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;
@ExtendWith(MockitoExtension.class)
-public class MessageHandlerUtilityTest {
+class MessageHandlerUtilityTest {
@Mock
private BlobClient mockBlobClient;
@@ -63,7 +63,7 @@ public class MessageHandlerUtilityTest {
private MessageReference messageReference;
@BeforeEach
- public void setUp() {
+ void setUp() {
System.setProperty("BlobStorageConnectionString", "https://www.dummyEndpoint.com/api/blobs");
var messageBody = new MessageBody();
diff --git a/composite-view/src/test/java/com/iluwatar/compositeview/AppServletTest.java b/composite-view/src/test/java/com/iluwatar/compositeview/AppServletTest.java
index 37dc71394..27c829a75 100644
--- a/composite-view/src/test/java/com/iluwatar/compositeview/AppServletTest.java
+++ b/composite-view/src/test/java/com/iluwatar/compositeview/AppServletTest.java
@@ -39,7 +39,7 @@ import static org.junit.Assert.*;
and https://stackoverflow.com/questions/50211433/servlets-unit-testing
*/
-public class AppServletTest extends Mockito{
+class AppServletTest extends Mockito{
private String msgPartOne = "This Server Doesn't Support";
private String msgPartTwo = "Requests
\n"
+ "Use a GET request with boolean values for the following parameters\n"
@@ -47,7 +47,7 @@ public class AppServletTest extends Mockito{
private String destination = "newsDisplay.jsp";
@Test
- public void testDoGet() throws Exception {
+ void testDoGet() throws Exception {
HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
HttpServletResponse mockResp = Mockito.mock(HttpServletResponse.class);
RequestDispatcher mockDispatcher = Mockito.mock(RequestDispatcher.class);
@@ -64,7 +64,7 @@ public class AppServletTest extends Mockito{
}
@Test
- public void testDoPost() throws Exception {
+ void testDoPost() throws Exception {
HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
HttpServletResponse mockResp = Mockito.mock(HttpServletResponse.class);
StringWriter stringWriter = new StringWriter();
@@ -78,7 +78,7 @@ public class AppServletTest extends Mockito{
}
@Test
- public void testDoPut() throws Exception {
+ void testDoPut() throws Exception {
HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
HttpServletResponse mockResp = Mockito.mock(HttpServletResponse.class);
StringWriter stringWriter = new StringWriter();
@@ -92,7 +92,7 @@ public class AppServletTest extends Mockito{
}
@Test
- public void testDoDelete() throws Exception {
+ void testDoDelete() throws Exception {
HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
HttpServletResponse mockResp = Mockito.mock(HttpServletResponse.class);
StringWriter stringWriter = new StringWriter();
diff --git a/composite-view/src/test/java/com/iluwatar/compositeview/JavaBeansTest.java b/composite-view/src/test/java/com/iluwatar/compositeview/JavaBeansTest.java
index 85f7e4a8a..826a00881 100644
--- a/composite-view/src/test/java/com/iluwatar/compositeview/JavaBeansTest.java
+++ b/composite-view/src/test/java/com/iluwatar/compositeview/JavaBeansTest.java
@@ -30,9 +30,9 @@ import org.mockito.Mockito;
import static org.junit.Assert.*;
-public class JavaBeansTest {
+class JavaBeansTest {
@Test
- public void testDefaultConstructor() {
+ void testDefaultConstructor() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertEquals("DEFAULT_NAME", newBean.getName());
assertTrue(newBean.isBusinessInterest());
@@ -43,7 +43,7 @@ public class JavaBeansTest {
}
@Test
- public void testNameGetterSetter() {
+ void testNameGetterSetter() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertEquals("DEFAULT_NAME", newBean.getName());
newBean.setName("TEST_NAME_ONE");
@@ -51,7 +51,7 @@ public class JavaBeansTest {
}
@Test
- public void testBusinessSetterGetter() {
+ void testBusinessSetterGetter() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertTrue(newBean.isBusinessInterest());
newBean.setBusinessInterest(false);
@@ -59,7 +59,7 @@ public class JavaBeansTest {
}
@Test
- public void testScienceSetterGetter() {
+ void testScienceSetterGetter() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertTrue(newBean.isScienceNewsInterest());
newBean.setScienceNewsInterest(false);
@@ -67,7 +67,7 @@ public class JavaBeansTest {
}
@Test
- public void testSportsSetterGetter() {
+ void testSportsSetterGetter() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertTrue(newBean.isSportsInterest());
newBean.setSportsInterest(false);
@@ -75,7 +75,7 @@ public class JavaBeansTest {
}
@Test
- public void testWorldSetterGetter() {
+ void testWorldSetterGetter() {
ClientPropertiesBean newBean = new ClientPropertiesBean();
assertTrue(newBean.isWorldNewsInterest());
newBean.setWorldNewsInterest(false);
@@ -83,7 +83,7 @@ public class JavaBeansTest {
}
@Test
- public void testRequestConstructor(){
+ void testRequestConstructor(){
HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
ClientPropertiesBean newBean = new ClientPropertiesBean((mockReq));
assertEquals("DEFAULT_NAME", newBean.getName());
diff --git a/dao/src/test/java/com/iluwatar/dao/DbCustomerDaoTest.java b/dao/src/test/java/com/iluwatar/dao/DbCustomerDaoTest.java
index b5f6a1d2e..666c7634c 100644
--- a/dao/src/test/java/com/iluwatar/dao/DbCustomerDaoTest.java
+++ b/dao/src/test/java/com/iluwatar/dao/DbCustomerDaoTest.java
@@ -70,7 +70,7 @@ class DbCustomerDaoTest {
* Represents the scenario where DB connectivity is present.
*/
@Nested
- public class ConnectionSuccess {
+ class ConnectionSuccess {
/**
* Setup for connection success scenario.
@@ -78,7 +78,7 @@ class DbCustomerDaoTest {
* @throws Exception if any error occurs.
*/
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
var dataSource = new JdbcDataSource();
dataSource.setURL(DB_URL);
dao = new DbCustomerDao(dataSource);
@@ -191,7 +191,7 @@ class DbCustomerDaoTest {
* @throws SQLException if any error occurs.
*/
@BeforeEach
- public void setUp() throws SQLException {
+ void setUp() throws SQLException {
dao = new DbCustomerDao(mockedDatasource());
}
diff --git a/flux/src/test/java/com/iluwatar/flux/action/ContentTest.java b/flux/src/test/java/com/iluwatar/flux/action/ContentTest.java
index 3807ad5c8..6fec8ce38 100644
--- a/flux/src/test/java/com/iluwatar/flux/action/ContentTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/action/ContentTest.java
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class ContentTest {
+class ContentTest {
@Test
void testToString() {
diff --git a/flux/src/test/java/com/iluwatar/flux/action/MenuItemTest.java b/flux/src/test/java/com/iluwatar/flux/action/MenuItemTest.java
index 033729997..3b995a804 100644
--- a/flux/src/test/java/com/iluwatar/flux/action/MenuItemTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/action/MenuItemTest.java
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class MenuItemTest {
+class MenuItemTest {
@Test
void testToString() {
diff --git a/flux/src/test/java/com/iluwatar/flux/dispatcher/DispatcherTest.java b/flux/src/test/java/com/iluwatar/flux/dispatcher/DispatcherTest.java
index 192afc5d5..0657e6cf7 100644
--- a/flux/src/test/java/com/iluwatar/flux/dispatcher/DispatcherTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/dispatcher/DispatcherTest.java
@@ -49,7 +49,7 @@ import org.mockito.ArgumentCaptor;
*
* @author Jeroen Meulemeester
*/
-public class DispatcherTest {
+class DispatcherTest {
/**
* Dispatcher is a singleton with no way to reset it's internal state back to the beginning.
@@ -57,7 +57,7 @@ public class DispatcherTest {
* influence on each other.
*/
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
final var constructor = Dispatcher.class.getDeclaredConstructor();
constructor.setAccessible(true);
diff --git a/flux/src/test/java/com/iluwatar/flux/store/ContentStoreTest.java b/flux/src/test/java/com/iluwatar/flux/store/ContentStoreTest.java
index 046b5a829..248894a59 100644
--- a/flux/src/test/java/com/iluwatar/flux/store/ContentStoreTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/store/ContentStoreTest.java
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class ContentStoreTest {
+class ContentStoreTest {
@Test
void testOnAction() {
diff --git a/flux/src/test/java/com/iluwatar/flux/store/MenuStoreTest.java b/flux/src/test/java/com/iluwatar/flux/store/MenuStoreTest.java
index 58726e4c0..0e556fea5 100644
--- a/flux/src/test/java/com/iluwatar/flux/store/MenuStoreTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/store/MenuStoreTest.java
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class MenuStoreTest {
+class MenuStoreTest {
@Test
void testOnAction() {
diff --git a/flux/src/test/java/com/iluwatar/flux/view/ContentViewTest.java b/flux/src/test/java/com/iluwatar/flux/view/ContentViewTest.java
index e1612b5c4..54f909a9b 100644
--- a/flux/src/test/java/com/iluwatar/flux/view/ContentViewTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/view/ContentViewTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class ContentViewTest {
+class ContentViewTest {
@Test
void testStoreChanged() {
diff --git a/flux/src/test/java/com/iluwatar/flux/view/MenuViewTest.java b/flux/src/test/java/com/iluwatar/flux/view/MenuViewTest.java
index f22f27512..314bcf147 100644
--- a/flux/src/test/java/com/iluwatar/flux/view/MenuViewTest.java
+++ b/flux/src/test/java/com/iluwatar/flux/view/MenuViewTest.java
@@ -43,7 +43,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class MenuViewTest {
+class MenuViewTest {
@Test
void testStoreChanged() {
diff --git a/flyweight/src/test/java/com/iluwatar/flyweight/AlchemistShopTest.java b/flyweight/src/test/java/com/iluwatar/flyweight/AlchemistShopTest.java
index 925282adb..044855438 100644
--- a/flyweight/src/test/java/com/iluwatar/flyweight/AlchemistShopTest.java
+++ b/flyweight/src/test/java/com/iluwatar/flyweight/AlchemistShopTest.java
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class AlchemistShopTest {
+class AlchemistShopTest {
@Test
void testShop() {
diff --git a/front-controller/src/test/java/com/iluwatar/front/controller/ApplicationExceptionTest.java b/front-controller/src/test/java/com/iluwatar/front/controller/ApplicationExceptionTest.java
index 7f19fcc3d..9214b2ce1 100644
--- a/front-controller/src/test/java/com/iluwatar/front/controller/ApplicationExceptionTest.java
+++ b/front-controller/src/test/java/com/iluwatar/front/controller/ApplicationExceptionTest.java
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class ApplicationExceptionTest {
+class ApplicationExceptionTest {
@Test
void testCause() {
diff --git a/front-controller/src/test/java/com/iluwatar/front/controller/CommandTest.java b/front-controller/src/test/java/com/iluwatar/front/controller/CommandTest.java
index e3712582c..1906fd16e 100644
--- a/front-controller/src/test/java/com/iluwatar/front/controller/CommandTest.java
+++ b/front-controller/src/test/java/com/iluwatar/front/controller/CommandTest.java
@@ -38,17 +38,17 @@ import org.junit.jupiter.params.provider.MethodSource;
*
* @author Jeroen Meulemeester
*/
-public class CommandTest {
+class CommandTest {
private InMemoryAppender appender;
@BeforeEach
- public void setUp() {
+ void setUp() {
appender = new InMemoryAppender();
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
appender.stop();
}
@@ -66,7 +66,7 @@ public class CommandTest {
*/
@ParameterizedTest
@MethodSource("dataProvider")
- public void testDisplay(String request, String displayMessage) {
+ void testDisplay(String request, String displayMessage) {
final var frontController = new FrontController();
assertEquals(0, appender.getLogSize());
frontController.handleRequest(request);
diff --git a/front-controller/src/test/java/com/iluwatar/front/controller/FrontControllerTest.java b/front-controller/src/test/java/com/iluwatar/front/controller/FrontControllerTest.java
index 0dd1705bc..8f510cf50 100644
--- a/front-controller/src/test/java/com/iluwatar/front/controller/FrontControllerTest.java
+++ b/front-controller/src/test/java/com/iluwatar/front/controller/FrontControllerTest.java
@@ -38,17 +38,17 @@ import org.junit.jupiter.params.provider.MethodSource;
*
* @author Jeroen Meulemeester
*/
-public class FrontControllerTest {
+class FrontControllerTest {
private InMemoryAppender appender;
@BeforeEach
- public void setUp() {
+ void setUp() {
appender = new InMemoryAppender();
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
appender.stop();
}
@@ -66,7 +66,7 @@ public class FrontControllerTest {
*/
@ParameterizedTest
@MethodSource("dataProvider")
- public void testDisplay(Command command, String displayMessage) {
+ void testDisplay(Command command, String displayMessage) {
assertEquals(0, appender.getLogSize());
command.process();
assertEquals(displayMessage, appender.getLastMessage());
diff --git a/front-controller/src/test/java/com/iluwatar/front/controller/ViewTest.java b/front-controller/src/test/java/com/iluwatar/front/controller/ViewTest.java
index 490174c64..e5bb7f1d3 100644
--- a/front-controller/src/test/java/com/iluwatar/front/controller/ViewTest.java
+++ b/front-controller/src/test/java/com/iluwatar/front/controller/ViewTest.java
@@ -38,17 +38,17 @@ import org.junit.jupiter.params.provider.MethodSource;
*
* @author Jeroen Meulemeester
*/
-public class ViewTest {
+class ViewTest {
private InMemoryAppender appender;
@BeforeEach
- public void setUp() {
+ void setUp() {
appender = new InMemoryAppender();
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
appender.stop();
}
@@ -66,7 +66,7 @@ public class ViewTest {
*/
@ParameterizedTest
@MethodSource("dataProvider")
- public void testDisplay(View view, String displayMessage) {
+ void testDisplay(View view, String displayMessage) {
assertEquals(0, appender.getLogSize());
view.display();
assertEquals(displayMessage, appender.getLastMessage());
diff --git a/game-loop/src/test/java/com/iluwatar/gameloop/AppTest.java b/game-loop/src/test/java/com/iluwatar/gameloop/AppTest.java
index 9a4b58113..72997b744 100644
--- a/game-loop/src/test/java/com/iluwatar/gameloop/AppTest.java
+++ b/game-loop/src/test/java/com/iluwatar/gameloop/AppTest.java
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
/**
* App unit test class.
*/
-public class AppTest {
+class AppTest {
@Test
void shouldExecuteApplicationWithoutException() {
diff --git a/game-loop/src/test/java/com/iluwatar/gameloop/FixedStepGameLoopTest.java b/game-loop/src/test/java/com/iluwatar/gameloop/FixedStepGameLoopTest.java
index 02d8503a7..8cd00f286 100644
--- a/game-loop/src/test/java/com/iluwatar/gameloop/FixedStepGameLoopTest.java
+++ b/game-loop/src/test/java/com/iluwatar/gameloop/FixedStepGameLoopTest.java
@@ -33,17 +33,17 @@ import org.junit.jupiter.api.BeforeEach;
/**
* FixedStepGameLoop unit test class.
*/
-public class FixedStepGameLoopTest {
+class FixedStepGameLoopTest {
private FixedStepGameLoop gameLoop;
@BeforeEach
- public void setup() {
+ void setup() {
gameLoop = new FixedStepGameLoop();
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
gameLoop = null;
}
diff --git a/game-loop/src/test/java/com/iluwatar/gameloop/GameControllerTest.java b/game-loop/src/test/java/com/iluwatar/gameloop/GameControllerTest.java
index 6e3fff643..a8eef3431 100644
--- a/game-loop/src/test/java/com/iluwatar/gameloop/GameControllerTest.java
+++ b/game-loop/src/test/java/com/iluwatar/gameloop/GameControllerTest.java
@@ -35,12 +35,12 @@ class GameControllerTest {
private GameController controller;
@BeforeEach
- public void setup() {
+ void setup() {
controller = new GameController();
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
controller = null;
}
diff --git a/guarded-suspension/src/test/java/com/iluwatar/guarded/suspension/GuardedQueueTest.java b/guarded-suspension/src/test/java/com/iluwatar/guarded/suspension/GuardedQueueTest.java
index ba8623f9d..33e9fc6b7 100644
--- a/guarded-suspension/src/test/java/com/iluwatar/guarded/suspension/GuardedQueueTest.java
+++ b/guarded-suspension/src/test/java/com/iluwatar/guarded/suspension/GuardedQueueTest.java
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
/**
* Test for Guarded Queue
*/
-public class GuardedQueueTest {
+class GuardedQueueTest {
private volatile Integer value;
@Test
diff --git a/half-sync-half-async/src/test/java/com/iluwatar/halfsynchalfasync/AsynchronousServiceTest.java b/half-sync-half-async/src/test/java/com/iluwatar/halfsynchalfasync/AsynchronousServiceTest.java
index 90a2f840c..a4c87135c 100644
--- a/half-sync-half-async/src/test/java/com/iluwatar/halfsynchalfasync/AsynchronousServiceTest.java
+++ b/half-sync-half-async/src/test/java/com/iluwatar/halfsynchalfasync/AsynchronousServiceTest.java
@@ -44,12 +44,12 @@ import org.junit.jupiter.api.Test;
*
* @author Jeroen Meulemeester
*/
-public class AsynchronousServiceTest {
+class AsynchronousServiceTest {
private AsynchronousService service;
private AsyncTask