Description
If a component is not visible, then "getComponentFromLastRenderedPage" will return null (as opposed to failing if it is not present). In the check below, it seems like "Result.fail" is missing a "return" preceding it. Otherwise, the "component.getClass()" immediately following will generate an NullPointerException.
public <C extends Component> Result isComponent(String path, Class<C> expectedComponentClass)
{
Component component = getComponentFromLastRenderedPage(path);
if (component == null)
return isTrue("component '" + Classes.simpleName(component.getClass()) + "' is not type:" + // <-- NPE thrown here
Classes.simpleName(expectedComponentClass),
expectedComponentClass.isAssignableFrom(component.getClass()));
}