@Test public void indexKeyContract() throws IOException {

  //give
  Note note1 = newNoteWithParagraph("Notebook1", "test");
  //when
  notebookIndex.addIndexDoc(note1);
  //then
  String id = resultForQuery("test").get(0).get(LuceneSearch.ID_FIELD);
  assertThat(Splitter.on("/").split(id)) //key structure <noteId>/paragraph/<paragraphId>
    .containsAllOf(note1.getId(), LuceneSearch.PARAGRAPH, note1.getLastParagraph().getId());
}