source: class BanDistributionManagementTest {
  
      private MavenProject project;
      private EnforcerRuleHelper helper;
  
      @Test( expected = EnforcerRuleException.class )
      public void shouldThrowExceptionIfDistributionManagementIsDefinedWithRepositorySnapshotRepository()
          throws Exception
      {
  
target:         BanDistributionManagement rule =
              setupProjectWithDistributionManagement( new DeploymentRepository(), new DeploymentRepository(), null );
          rule.execute( helper );
          // intentionally no assert cause we expect an exception.
      }
  
  }