You function requires two integers because of this:
public static boolean testPerfect(int num, int test)
You call it with 1 integer here:
testPerfect(num);
This is by the way exactly what the error says:
The function:
testPerfect(num);
Needs two integers
required :int, int
But you called it with one:
found: int
So the error is because the amount of arguments is not correct:
reason: actual and formal argument list differ in length