.setFieldChange(context, "assignee", "simon", null)
.setSendNotifications(true)
.setComponentKey("struts:Action")
.setProjectKey("struts");
Notification notification = issueNotifications.sendChanges(issue, context, null, new Project("struts"), null).get(0);
assertThat(notification.getFieldValue("message")).isEqualTo("the message");
assertThat(notification.getFieldValue("key")).isEqualTo("ABCDE");
assertThat(notification.getFieldValue("componentKey")).isEqualTo("struts:Action");
assertThat(notification.getFieldValue("componentName")).isNull();
assertThat(notification.getFieldValue("old.resolution")).isNull();
assertThat(notification.getFieldValue("new.resolution")).isEqualTo("FIXED");
assertThat(notification.getFieldValue("old.status")).isEqualTo("OPEN");
assertThat(notification.getFieldValue("new.status")).isEqualTo("RESOLVED");
assertThat(notification.getFieldValue("old.assignee")).isEqualTo("simon");
assertThat(notification.getFieldValue("new.assignee")).isNull();
Mockito.verify(manager).scheduleForSending(eq(Arrays.asList(notification)));
}