//Given
Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
final List<ElementType> elementTypes = asList(FIELD, METHOD);
final ImmutableMap<RetentionPolicy, ElementType> retentionPolicies = ImmutableMap.of(SOURCE, ANNOTATION_TYPE, RUNTIME, CONSTRUCTOR);
manager.insert(new EntityWithEnumeratedConfig(id, ConsistencyLevel.LOCAL_ONE, elementTypes, retentionPolicies));
final EntityWithEnumeratedConfig found = manager.find(EntityWithEnumeratedConfig.class, id);
assertThat(found.getConsistencyLevel()).isEqualTo(ConsistencyLevel.LOCAL_ONE);
assertThat(found.getElementTypes()).containsExactly(FIELD, METHOD);
assertThat(found.getRetentionPolicies()).contains(entry(SOURCE, ANNOTATION_TYPE), entry(RUNTIME, CONSTRUCTOR));
}