protected KieServicesClient createDefaultClient() {
    Set<Class<?>> extraClasses = new HashSet<Class<?>>();
    try {
      extraClasses.add(Class.forName("org.jbpm.data.Person", true, kieContainer.getClassLoader()));
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
    KieServicesClient kieServicesClient = null;
    if (TestConfig.isLocalServer()) {
      KieServicesConfiguration localServerConfig =
          KieServicesFactory.newRestConfiguration(TestConfig.getHttpUrl(), null, null)
              .setMarshallingFormat(marshallingFormat);

      localServerConfig.addJaxbClasses(extraClasses);
      kieServicesClient =
          KieServicesFactory.newKieServicesClient(localServerConfig, kieContainer.getClassLoader());
    } else {
      configuration.setMarshallingFormat(marshallingFormat);
      configuration.addJaxbClasses(extraClasses);
      configuration.setUserName("Administrator");
      kieServicesClient =
          KieServicesFactory.newKieServicesClient(configuration, kieContainer.getClassLoader());
    }
    configuration.setTimeout(5000);
    setupClients(kieServicesClient);

    return kieServicesClient;
  }
 protected static KieServicesConfiguration createKieServicesRestConfiguration() {
   return KieServicesFactory.newRestConfiguration(
       TestConfig.getHttpUrl(), TestConfig.getUsername(), TestConfig.getPassword());
 }