@Test(expectedExceptions = ClassCastException.class)
public void classCastException() {

    List<String> services = ServiceObjectFactory.createServiceObjects("service/test-services");
    String bla = services.get(0);
}