NodeDeployTask { protected Properties getJppfNodeConfiguration(String driverIpAddress) { Properties properties = new Properties(); properties.setProperty(JPPFConstants.MANAGEMENT_ENABLED, "true"); properties.setProperty(JPPFConstants.DISCOVERY_ENABLED, "false"); properties.setProperty(JPPFConstants.RECONNECT_MAX_TIME, "60"); properties.setProperty(JPPFConstants.RECONNECT_INTERVAL, "10"); if(nodeConfiguration.getJvmOptions().isPresent()) { properties.setProperty(JPPFConstants.JVM_OPTIONS, nodeConfiguration.getJvmOptions().get()); } properties.setProperty(JPPFConstants.CLASSLOADER_DELEGATION, "parent"); properties.setProperty(JPPFConstants.SERVER_HOST, driverIpAddress); properties.setProperty(JPPFConstants.MANAGEMENT_PORT, String.valueOf(managementPort)); properties.setProperty(JPPFConstants.RESOURCE_CACHE_DIR, String.format("/tmp/.jppf/node-%s_%d", torqueNodeDeployment.getSessionId(), nodeNumber)); properties.setProperty(JPPFConstants.PROCESSING_THREADS, String.valueOf(nodeConfiguration.getNumberOfCpus())); return properties; } NodeDeployTask(TorqueNodeDeployment torqueNodeDeployment, int nodeNumber,
            TorqueNodeConfiguration nodeConfiguration, TorqueConfiguration torqueConfiguration); void execute(); String base64Encode(String toEncode);  }
@Test public void createNodeConfiguration() { Properties nodeConfiguration = nodeDeployTask.getJppfNodeConfiguration("driverIp"); assertThat(nodeConfiguration.getProperty(JPPFConstants.SERVER_HOST), is("driverIp")); assertThat(nodeConfiguration.getProperty(JPPFConstants.MANAGEMENT_PORT), is(String.valueOf(TorqueNodeDeployment.DEFAULT_MANAGEMENT_PORT+10))); assertThat(nodeConfiguration.getProperty(JPPFConstants.PROCESSING_THREADS), is(String.valueOf(NUMBER_OF_CPUS))); }