HaloToolboxApi { @Api(1.1) @NonNull public HaloThreadManager queue() { return mQueue; } protected  HaloToolboxApi(@NonNull HaloFramework framework, @NonNull HaloThreadManager syncQueue, @NonNull EventBus eventHub, @NonNull HaloJobScheduler jobScheduler); @Api(1.3) @NonNull static HaloToolboxApi newSyncApi(@NonNull HaloFramework framework, @NonNull HaloConfig configuration); @Api(1.1) @NonNull HaloThreadManager queue(); @Api(1.3) @NonNull EventBus eventHub(); @Api(2.0) void schedule(@NonNull Job job); @Api(2.0) void schedule(@NonNull Job... jobs); @Api(1.3) @NonNull HaloFramework framework();  }
@Test public void thatEnqueueATaskAndRunTheTask(){ runEnded = false; mToolbox.queue().enqueue(Threading.POOL_QUEUE_POLICY, new Runnable() { @Override public void run() { runEnded = true; } }); assertThat(runEnded).isTrue(); }