@Test
public void testCreateNewNote() {

    when(noteSaver.createNewNote(any(Note.class)))
            .thenReturn(new SaveResponse(TestData.NEW_ID));
    NoteModel model = viewModel.initAndResume();
    verify(noteLoader, never()).load(anyString());
    model.getTitle().set(TestData.NEW_TITLE);
    model.getText().set(TestData.NEW_TEXT);
    viewModel.save();
    verify(noteSaver).createNewNote(captor.capture());
    assertThat(captor.getValue())
            .isEqualToComparingFieldByField(new Note(null, TestData.NEW_TITLE, TestData.NEW_TEXT));
    assertThat(model.getNoteId()).isEqualTo(TestData.NEW_ID);
}