PGETaskInstance implements WorkflowTaskInstance { protected WorkflowManagerClient getWorkflowManagerClient() throws MalformedURLException { if (this.wmClient == null) { String url = pgeMetadata.getMetadata(WORKFLOW_MANAGER_URL); logger.info("Creating WorkflowManager client for url [" + url + "]"); Validate.notNull(url, "Must specify " + WORKFLOW_MANAGER_URL); this.wmClient = RpcCommunicationFactory.createClient(new URL(url)); } return this.wmClient; } protected  PGETaskInstance(); @Override void run(Metadata metadata, WorkflowTaskConfiguration config); String getWorkflowInstId(); void setWorkflowInstId(String workflowInstId); void setWmClient(WorkflowManagerClient wmClient); @Override void finalize();  }
@Test public void testCreateWorkflowManagerClient() throws Exception { PGETaskInstance pgeTask = createTestInstance(); pgeTask.pgeMetadata.replaceMetadata(WORKFLOW_MANAGER_URL, "http: assertNotNull(pgeTask.getWorkflowManagerClient()); }