### Question:
NativeCommandListener extends CommandListenerAdapter { @Override public void onSuccess(String childId) { if (promise != null) promise.resolve(childId); eventEmitter.emitCommandCompleted(commandId, now.now()); } NativeCommandListener(String commandId, @Nullable Promise promise, EventEmitter eventEmitter, Now now); @Override void onSuccess(String childId); @Override void onError(String message);  }### Answer:
@Test public void onSuccess() { uut.onSuccess(CHILD_ID); verify(promise, times(1)).resolve(CHILD_ID); }
@Test public void onSuccess_emitsNavigationEvent() { uut.onSuccess(CHILD_ID); verify(eventEmitter, times(1)).emitCommandCompleted(COMMAND_ID, NOW); }