QueueProcessor implements ContextProcessor { @Override public void process(String host, String value, ApplicationId applicationId, ApplicationSubmissionContext submissionContext) { submissionContext.setQueue(value); }  @Override void process(String host, String value, ApplicationId applicationId,
      ApplicationSubmissionContext submissionContext);  }
@Test public void testQueueProcessor() { ContextProcessor queueProcessor = new QueueProcessor(); ApplicationId app = ApplicationId.newInstance(123456, 111); ApplicationSubmissionContext applicationSubmissionContext = mock(ApplicationSubmissionContext.class); when(applicationSubmissionContext.getApplicationId()).thenReturn(app); queueProcessor.process("host.cluster2.com", "queue1", app, applicationSubmissionContext); verify(applicationSubmissionContext, times(1)).setQueue("queue1"); }