public static void deployCommand(final APISession apiSession) throws BonitaException { final CommandAPI commandAPI = TenantAPIAccessor.getCommandAPI(apiSession); byte[] commandJar; try { commandJar = IOUtil.getAllContentFrom(APITestUtil.class.getResourceAsStream("/server-command.bak")); } catch (final IOException e) { throw new RetrieveException(e); } commandAPI.addDependency("commands", commandJar); commandAPI.register("waitServerCommand", "waitServerCommand", "org.bonitasoft.engine.test.synchro.WaitServerCommand"); commandAPI.register("addHandlerCommand", "addHandlerCommand", "org.bonitasoft.engine.test.synchro.AddHandlerCommand"); final Map<String, Serializable> parameters = Collections.emptyMap(); commandAPI.execute("addHandlerCommand", parameters); }