@Test
public void testGetAlert() {

    TestAlert mgrAlert = new TestAlert(this.manager);
    TestAlert srcAlert = new TestAlert(this.source);
    SourceAlertID mgrId = new SourceAlertID(mgrAlert.getId(), this.manager);
    SourceAlertID srcId = new SourceAlertID(srcAlert.getId(), this.source);
    this.provider.addAlertSource(this.source);
    this.provider.addAlertManager(this.manager);
    when(this.source.getAlert(any(Alert.ID.class))).thenReturn(Optional.of(srcAlert));
    when(this.source.getAlertAsServiceAccount(any(Alert.ID.class))).thenReturn(Optional.of(srcAlert));
    when(this.manager.getAlert(any(Alert.ID.class))).thenReturn(Optional.of(mgrAlert));
    when(this.manager.getAlertAsServiceAccount(any(Alert.ID.class))).thenReturn(Optional.of(mgrAlert));
    Alert getMgrAlert = providerToSourceAlertFunction().apply(this.provider.getAlert(mgrId).get());
    Alert getSrcAlert = providerToSourceAlertFunction().apply(this.provider.getAlert(srcId).get());
    assertThat(getMgrAlert).isEqualTo(mgrAlert);
    assertThat(getSrcAlert).isEqualTo(srcAlert);
}