public class Calculator { public int add( int a, int b) { return a + b; } }

public void testAdd() { assertEquals(3, calculator.add(2, 1)); assertEquals(2, calculator.add(2, 0)); assertEquals(1, calculator.add(2, -1)); }