import org.junit.Test; import static org.junit.Assert.*; public class CalculatorTest { @Test public void testAddition() { Calculator calc = new Calculator(); int result = calc.add(2, 3); assertEquals(5, result); } }In this code snippet, we're testing the addition function of a calculator by creating an instance of the Calculator class and calling the add() method with two inputs. We then use the assertEquals() method to check if the resulting value is equal to 5. If the result is not 5, the assertion will fail and an error message will be displayed. The package library for org.junit.Assert is the JUnit testing framework, which is widely used for writing and running unit tests in Java.