package org.camunda.bpm.spring.boot.starter;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin;
import org.camunda.bpm.spring.boot.starter.configuration.Ordering;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;

@TestConfiguration
public class AdditionalCammundaBpmConfigurations {

  @Bean
  public ProcessEnginePlugin beforeStandardConfiguration() {
    return new BeforeStandardConfiguration();
  }

  @Bean
  public ProcessEnginePlugin afterStandardConfiguration() {
    return new AfterStandardConfiguration();
  }

  @Order(Ordering.DEFAULT_ORDER - 1)
  public static class BeforeStandardConfiguration implements ProcessEnginePlugin {

    static boolean PROCESSED = false;

    @Override
    public void preInit(ProcessEngineConfigurationImpl configuration) {
      assertNull(configuration.getDataSource());
      PROCESSED = true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#postInit(org.camunda.
     * bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)
     */
    @Override
    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
      // TODO Auto-generated method stub

    }

    /*
     * (non-Javadoc)
     * 
     * @see org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#
     * postProcessEngineBuild(org.camunda.bpm.engine.ProcessEngine)
     */
    @Override
    public void postProcessEngineBuild(ProcessEngine processEngine) {
      // TODO Auto-generated method stub

    }

  }

  @Order(Ordering.DEFAULT_ORDER + 1)
  public static class AfterStandardConfiguration implements ProcessEnginePlugin {

    static boolean PROCESSED = false;

    @Override
    public void preInit(ProcessEngineConfigurationImpl configuration) {
      assertNotNull(configuration.getDataSource());
      PROCESSED = true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#postInit(org.camunda.
     * bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)
     */
    @Override
    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
      // TODO Auto-generated method stub

    }

    /*
     * (non-Javadoc)
     * 
     * @see org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#
     * postProcessEngineBuild(org.camunda.bpm.engine.ProcessEngine)
     */
    @Override
    public void postProcessEngineBuild(ProcessEngine processEngine) {
      // TODO Auto-generated method stub

    }

  }
}

@@ -1182,1513 +1182,767 @@
     
-/*%0A     * (non-Javadoc)%0A     * %0A     * @see%0A     * org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#postInit(org.camunda.%0A     * bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)%0A     */%0A    @Override%0A    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     * %0A     * @see org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#%0A     * postProcessEngineBuild(org.camunda.bpm.engine.ProcessEngine)%0A     */%0A    @Override%0A    public void postProcessEngineBuild(ProcessEngine processEngine) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A%0A  %7D%0A%0A  @Order(Ordering.DEFAULT_ORDER + 1)%0A  public static class AfterStandardConfiguration implements ProcessEnginePlugin %7B%0A%0A    static boolean PROCESSED = false;%0A%0A    @Override%0A    public void preInit(ProcessEngineConfigurationImpl configuration) %7B%0A      assertNotNull(configuration.getDataSource());%0A      PROCESSED = true;%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     * %0A     * @see%0A     * org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#postInit(org.camunda.%0A     * bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)%0A     */%0A    @Override%0A    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     * %0A     * @see org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin#%0A     * postProcessEngineBuild(org.camunda.bpm.engine.ProcessEngine)%0A     */
+@Override%0A    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A%0A    @Override%0A    public void postProcessEngineBuild(ProcessEngine processEngine) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A%0A  %7D%0A%0A  @Order(Ordering.DEFAULT_ORDER + 1)%0A  public static class AfterStandardConfiguration implements ProcessEnginePlugin %7B%0A%0A    static boolean PROCESSED = false;%0A%0A    @Override%0A    public void preInit(ProcessEngineConfigurationImpl configuration) %7B%0A      assertNotNull(configuration.getDataSource());%0A      PROCESSED = true;%0A    %7D%0A%0A    @Override%0A    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) %7B%0A      // TODO Auto-generated method stub%0A%0A    %7D%0A
 %0A   

remove not needed javadoc