optionsServiceContext.addPropertyOption( entityType, propertyName, new PermissionOption( "user" ), "read" );
optionsServiceContext.addPropertyOption( entityType, propertyName, new PermissionOption( "author" ), "read,write" );
optionsServiceContext.addEntityOption( entityType, new PermissionOption( "admin" ), "read,write,delete" );
// when
OptionsContext context = OptionsContextImpl.forProperty( getSources(), entityType, propertyName );
// then
assertThat( context.getAll( PermissionOption.class ) ).
hasSize( 2 )
.includes(
entry( "user", "read" ),
entry( "author", "read,write" )
);