Here you can find the source of assertInstanceOf(Object object, Class> expectClass)
public static void assertInstanceOf(Object object, Class<?> expectClass)
//package com.java2s; //License from project: Apache License public class Main { public static void assertInstanceOf(Object object, Class<?> expectClass) { boolean b = expectClass.isInstance(object); if (b == false) { throw new AssertionError(String.format("The expect class is %s, but actually %s.", expectClass.getName(), object.getClass().getName())); }/*from w w w. j a v a2 s .c o m*/ } }