Suppose we have this interface:
interface CallChecker {
boolean canCall(String ipAddress, Object method);
}
And we limit 10 calls per second from one IP for each method, i.e. if a method is called more than 10 times in one second, CallChecker::canCall(ip, method) should return false.
How do we unit test this function?
Side question: is there a better way to define method instead of Object type?