Verify Calculator operations using @Nested inner classes in JUnit
Preconditions (2)
Step 1: Create a test class CalculatorTest
Step 2: Inside CalculatorTest, create a @Nested class AddTests
Step 3: In AddTests, write a test method testAddPositiveNumbers that asserts add(2,3) equals 5
Step 4: Inside CalculatorTest, create another @Nested class SubtractTests
Step 5: In SubtractTests, write a test method testSubtractPositiveNumbers that asserts subtract(5,3) equals 2
Step 6: Run the CalculatorTest class
✅ Expected Result: Both testAddPositiveNumbers and testSubtractPositiveNumbers pass successfully, showing that @Nested classes organize related tests