diff --git a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java index a7ecf7aabe..1c9c4172ca 100644 --- a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java +++ b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java @@ -2,9 +2,9 @@ package com.baeldung.constantspatterns.calculations; public final class MathConstants { public static final double PI = 3.14159265359; - public static final double GOLDEN_RATIO = 1.6180; - public static final double GRAVITATIONAL_ACCELERATION = 9.8; - public static final double EULERS_NUMBER = 2.7182818284590452353602874713527; + static final double GOLDEN_RATIO = 1.6180; + static final double GRAVITATIONAL_ACCELERATION = 9.8; + static final double EULERS_NUMBER = 2.7182818284590452353602874713527; public enum Operation { ADD, SUBTRACT, DIVIDE, MULTIPLY diff --git a/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java b/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java index 39cb8f82f9..ba8f237fd3 100644 --- a/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java +++ b/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java @@ -6,7 +6,7 @@ import org.junit.Test; public class ConstantPatternUnitTest { @Test - public void givenTwoNumbersAndAdd_whenCallingCalculatorOperatOneTwoNumbers_correctAnswerReturned() { + public void givenTwoNumbersAndAdd_whenCallingCalculatorOperatOneTwoNumbers_thenCorrectAnswerReturned() { Calculator calculator = new Calculator(); double expected = 4; double answer = calculator.operateOnTwoNumbers(2, 2, Calculator.Operation.ADD); @@ -14,7 +14,7 @@ public class ConstantPatternUnitTest { } @Test - public void givenTwoNumbersAndAdd_whenCallingGeometryCalculatorOperatOneTwoNumbers_correctAnswerReturned() { + public void givenTwoNumbersAndAdd_whenCallingGeometryCalculatorOperatOneTwoNumbers_thenCorrectAnswerReturned() { GeometryCalculator calculator = new GeometryCalculator(); double expected = 4; double answer = calculator.operateOnTwoNumbers(2, 2, GeometryCalculator.Operation.ADD);