@Test
public void verifyAllNotesArePersistedWhenNotesAreNotOnDatabase()
{

    // Given
    final List<Note> notes = rnd.randomObjects( Note.class, 5, "newNote" );
    final List<String> notesUid = notes.stream().map( Note::getNote ).collect( Collectors.toList() );
    event.setNotes( notes );
    // When
    when( commentService.filterExistingNotes( notesUid ) ).thenReturn( notesUid );
    this.hook.validateEvent( mock( ValidationErrorReporter.class ), event );
    // Then
    assertThat( event.getNotes(), hasSize( 5 ) );
}