@Test
    void findFields() {
        List<IndexField> fields = getFields(DOC_REF_1);
        assertThat(fields.size())
                .isEqualTo(0);

        indexFieldDao.addFields(DOC_REF_1, List.of(FIELD_1, FIELD_2, FIELD_3));
        indexFieldDao.addFields(DOC_REF_2, List.of(FIELD_3));

        fields = getFields(DOC_REF_1);
        assertThat(fields.size())
                .isEqualTo(3);

        fields = getFields(DOC_REF_2);
        assertThat(fields.size())
                .isEqualTo(1);
    }
Make sure multiple threads can concurrently add different lists of fields
stroom-index/stroom-index-impl-db/src/test/java/stroom/index/impl/db/TestIndexFieldDaoImpl.java