@Test
//Test to ensure that the right exception is thrown
public void testErrOpLimitOptimizer() throws Exception {
org.apache.pig.impl.logicalLayer.LogicalPlan lp = new org.apache.pig.impl.logicalLayer.LogicalPlan();
OpLimitOptimizer olo = new OpLimitOptimizer(lp);
try {
olo.transform(lp.getRoots());
} catch(Exception e) {
Assert.assertTrue(((OptimizerException)e).getErrorCode() == 2052);
}
}