### Question:
GraphWorker implements Runnable { public void submitTask(final Task requestedTask, final Callback<TaskResult> requesterCallback) { int taskCallbackId = callbacksRegistry.register(new Callback<Buffer>() { @Override public void on(Buffer response) { final BaseTaskResult baseTaskResult = new BaseTaskResult(null, false); final L3GMap<List<Tuple<Object[], Integer>>> collector = new L3GMap<List<Tuple<Object[], Integer>>>(true); baseTaskResult.load(response, 0, workingGraphInstance, collector); workingGraphInstance.remoteNotify(baseTaskResult.notifications()); baseTaskResult.loadRefs(workingGraphInstance, collector, new Callback<Boolean>() { @Override public void on(Boolean result) { response.free(); requesterCallback.on(baseTaskResult); } }); } }); Buffer taskBuffer = new HeapBuffer(); taskBuffer.write(StorageMessageType.REQ_TASK); taskBuffer.write(Constants.BUFFER_SEP); taskBuffer.writeInt(this.mailboxId); taskBuffer.write(Constants.BUFFER_SEP); Base64.encodeIntToBuffer(taskCallbackId, taskBuffer); taskBuffer.write(Constants.BUFFER_SEP); requestedTask.saveToBuffer(taskBuffer); mailbox.submit(taskBuffer.data()); } GraphWorker(GraphBuilder workingGraphBuilder, boolean canProcessGeneralTaskQueue);  GraphWorker(GraphBuilder workingGraphBuilder, String name, boolean canProcessGeneralTaskQueue); GraphWorker withLogDirectory(String path, String maxSize); void setName(String name); String getName(); void halt(); int getId(); void setTaskWorker(); boolean submit(byte[] activity); void setOnWorkerStarted(PoolReadyCallback onWorkerStarted); Log log(); @Override void run(); void submitTask(final Task requestedTask, final Callback<TaskResult> requesterCallback); void submitPreparedTask(final Task requestedTask, final TaskContext requestedTaskContext); boolean isRunning();  }### Answer:
@Test public void _00_addNodeToCoreGraph() { try { CountDownLatch latch = new CountDownLatch(1); long ts0 = System.currentTimeMillis(); Task createNode = Tasks.newTask() .declareIndex("nodes", "name") .createNode() .setAttribute("name", Type.STRING, "Node 0") .updateIndex("nodes"); localWorker.submitTask(createNode, creationResult -> { if (creationResult.exception() != null) { creationResult.exception().printStackTrace(); } long ts1 = System.currentTimeMillis(); assertEquals(1, creationResult.size()); assertTrue(creationResult.get(0) instanceof Node); assertEquals("Node 0", ((Node) creationResult.get(0)).get("name")); assertNull(creationResult.exception()); assertNull(creationResult.output()); latch.countDown(); }, GraphWorkerPool.getInstance().getRootWorkerMailboxId()); latch.await(); } catch (InterruptedException e) { e.printStackTrace(); } }