public class TestingHandyMethods { public static void main(String[] args) { HandyMethods srv = new HandyMethods(); // ===== Tests for times2 method ========================= System.out.println("\n===== TESTS FOR times2 METHOD =============================="); int input = 0; int expectedOutput = 0; int actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = 1; expectedOutput = 2; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = 2; expectedOutput = 4; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = 321; expectedOutput = 642; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = -1; expectedOutput = -2; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = -15; expectedOutput = -30; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } input = -111; expectedOutput = -222; actualOutput = srv.times2(input); if (actualOutput == expectedOutput) { System.out.println(" PASS: times2(" + input + ") --> " + actualOutput); } else { System.out.println("*** FAIL: times2(" + input + ") --> " + actualOutput + " (expected " + expectedOutput + ")"); } // ===== Tests for moreUpperThanLower method ============= // your code goes here // ===== Tests for biggestInt method ====================== // your code goes here } }