Assert.isInstanceOf() has thrown an IllegalArgumentException

Typical Exception Messages

Object of class [java.lang.String] must be an instance of interface org.acegisecurity.userdetails.UserDetails

Object of class [null] must be an instance of interface org.springframework.integration.Message

Object of class [null] must be an instance of interface javax.management.MBeanServer

Object of class [org.springframework.web.portlet.context.PortletRequestAttributes] must be an instance of class org.springframework.web.context.request.ServletRequestAttributes

Object of class [org.springframework.web.context.request.RequestAttributes$$EnhancerByMockitoWithCGLIB$$1f9bfe9c] must be an instance of class org.springframework.web.context.request.ServletRequestAttributes

Object of class [org.springframework.integration.channel.QueueChannel] must be an instance of interface org.springframework.messaging.SubscribableChannel

Object of class [java.lang.reflect.Method] must be an instance of interface org.springframework.hateoas.core.DummyInvocationUtils$LastInvocationAware

Object of class [org.springframework.web.socket.BinaryMessage] must be an instance of class org.springframework.web.socket.TextMessage

Object of class [sun.net.www.protocol.file.FileURLConnection] must be an instance of class java.net.HttpURLConnection