public boolean update(final String profileId, final IndexFieldTypeProfile updatedProfile) {
        if (!ObjectId.isValid(profileId)) {
            return false;
        }
        updatedProfile.customFieldMappings().forEach(mapping -> checkFieldTypeCanBeChanged(mapping.fieldName()));
        final WriteResult<IndexFieldTypeProfile, ObjectId> writeResult = db.updateById(new ObjectId(profileId), updatedProfile);
        return writeResult.getN() > 0;
    }
@Test
    public void testUpdate() {
        final IndexFieldTypeProfile profile = new IndexFieldTypeProfile("123400000000000000000001", "profile", "profile", new CustomFieldMappings());
        toTest.save(profile);

        final IndexFieldTypeProfile updatedProfile = new IndexFieldTypeProfile(profile.id(), "Changed!", "Changed!",
                new CustomFieldMappings(List.of(new CustomFieldMapping("field", "date"))));
        toTest.update(profile.id(), updatedProfile);

        assertEquals(updatedProfile, toTest.get(profile.id()).get());
    }