I am having nightmares with the syntax for this and easymock:
public void foo(Class> clazz);
EasyMock.expects(object.foo(EasyMock.isA(???)));
You're attempting to verify a generic type that will be erased at runtime anyway.
Use a capture object instead:
Capture<Class<?>> classCapture = new Capture<Class<?>>();
EasyMock.expect(object.foo(EasyMock.capture(classCapture)));
// ... other test setup ...
Assert.assertEquals(classCapture.getValue(), String.class);
I think the following will also work as an expect statement if you don't want to use a Capture:
EasyMock.expects(object.foo(EasyMock.isA(String.class.getClass())));