public PackagingRule packaging = new PackagingRule( "persistencexml/jpajtastandalone-options.xml", Refrigerator.class );
@Test
public void shouldApplyOptionConfiguratorSpecifiedInPersistenceXml() throws Exception {
final EntityManagerFactory emf = Persistence.createEntityManagerFactory( "jpajtastandalone-options" );
OptionsServiceContext optionsContext = getOptionsContext( emf );
OptionsContext refrigatorOptions = optionsContext.getEntityOptions( Refrigerator.class );
assertThat( refrigatorOptions.getUnique( ForceExampleOption.class ) ).isTrue();
OptionsContext microwaveOptions = optionsContext.getEntityOptions( Microwave.class );
assertThat( microwaveOptions.getUnique( NameExampleOption.class ) ).isEqualTo( "test" );
OptionsContext temperatureOptions = optionsContext.getPropertyOptions( Refrigerator.class, "temperature" );
assertThat( temperatureOptions.getUnique( EmbedExampleOption.class ) ).isEqualTo( "Embedded" );
dropSchemaAndDatabase( emf );
emf.close();
}