import org.junit.Test;
import static org.junit.Assert.*;
public class MathUtilsTest {
@Test
public void testAddition() {
// Arrange
MathUtils mathUtils = new MathUtils();
// Act
int result = mathUtils.add(2, 3);
// Assert
assertEquals(5, result);
}
}
<dependencies>
...
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
...
</dependencies>