I have used the Assert Equals (Expected, Actual) method which takes two integers value and stores its sum in the Actual variable. I am putting my code below.
public class CalcTest { @Test public void test () { Calc CT = new Calc (); int actual = CT.add(1,2); int expected = 3; assertEquals(expected, actual); } }
Expected: I want the correct code with the right output.