  @Test(expected = ResourceInitializationException.class)
  public void testAAEMultipleDeploymentPolicyProblem() throws Exception {

    {
      AnalysisEngineDescription desc1 = AnalysisEngineFactory.createEngineDescription(
              PristineAnnotatorClass.class, (Object[]) null);
      assertTrue(
              "Multiple deployment should be allowed on " + desc1.getAnnotatorImplementationName(),
              desc1.getAnalysisEngineMetaData().getOperationalProperties()
                      .isMultipleDeploymentAllowed());

      AnalysisEngineDescription desc2 = AnalysisEngineFactory.createEngineDescription(
              UnannotatedAnnotatorClass.class, (Object[]) null);
      assertFalse(
              "Multiple deployment should be prohibited on "
                      + desc2.getAnnotatorImplementationName(), desc2.getAnalysisEngineMetaData()
                      .getOperationalProperties().isMultipleDeploymentAllowed());

      AnalysisEngineDescription aae = AnalysisEngineFactory
              .createEngineDescription(desc1, desc2);
      aae.getAnalysisEngineMetaData().getOperationalProperties().setMultipleDeploymentAllowed(true);
      UIMAFramework.produceAnalysisEngine(aae);
    }
  }