@Test
public void testTagAddProcessor() {

  ContextProcessor tagAddProcessor = new TagAddProcessor();
  ApplicationId app = ApplicationId.newInstance(123456, 111);
  ApplicationSubmissionContext applicationSubmissionContext =
      mock(ApplicationSubmissionContext.class);
  when(applicationSubmissionContext.getApplicationId()).thenReturn(app);
  tagAddProcessor.process("host.cluster2.com",
      "cluster:cluster1", app, applicationSubmissionContext);
  Set<String> applicationTags = new HashSet<String>();
  applicationTags.add("cluster:cluster1");
  verify(applicationSubmissionContext, times(1))
      .setApplicationTags(applicationTags);
}