@Test
public void testNodeLabelProcessor() {

  ContextProcessor nodeLabelProcessor = new NodeLabelProcessor();
  ApplicationId app = ApplicationId.newInstance(123456, 111);
  ApplicationSubmissionContext applicationSubmissionContext =
      mock(ApplicationSubmissionContext.class);
  when(applicationSubmissionContext.getApplicationId()).thenReturn(app);
  nodeLabelProcessor.process("host.cluster2.com", "foo", app,
      applicationSubmissionContext);
  verify(applicationSubmissionContext, times(1))
      .setNodeLabelExpression("foo");
}