The code you posted looks fine; I don't see a problem with it. It is likely the code immediately before or above it causing an exception. The key is here:
Invalid use of argument matchers! 1 matchers expected, 2 recorded.
any
, as you used it above, doesn't return a "special kind of null" or "special kind of GetProgramType"; those don't exist. Instead, it returns null and as a side effect puts a matcher on a stack. When checking for matchers, Mockito looks at the stack, and checks that it is either empty (i.e. check equality with all arguments) or exactly equal to the number of arguments in the call you're checking (i.e. there is a matcher for each argument).
What's happening here is that you're getting one more matcher than the callService
method expects. I see this often enough when developers mistakenly try to save a matcher in a local variable:
String expectedString = Matchers.anyString(); // DOESN'T WORK
// Instead, this just adds a matcher to the stack, almost certainly where it
// doesn't belong.
...or mock a final method:
// Assume getProgramService.otherMethod is final.
when(getProgramService.otherMethod(anyString())).thenReturn(123L);
// This actually calls getProgramService.otherMethod(null) and leaves an
// anyString matcher on the stack without setting any expectation that
// would returns 123L.
To confirm this is a problem, temporarily add this statement immediately before the one you posted:
Mockito.validateMockitoUsage();
This artificially checks the stack for matchers, and will likely throw an exception on that line. If it does, check the code above your post. Either way, adding some surrounding code to your question will likely help us debug it.