mockito any(class t clazz) code example Example: mockito any class class when(a.method(any(Class.class))).thenReturn(b);