Fix NPE in ClientAPITest and others where WebPartFactory.getWebPartView