@Test(groups = { "oam", "functional.mgmt" })

public void testLmr() {
    String rspCmd = "sccp lmr create 1 11 12 udt";
    String res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 1);
    LongMessageRule lmr = this.router.getLongMessageRule(1);
    assertEquals(lmr.getFirstSpc(), 11);
    assertEquals(lmr.getLastSpc(), 12);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LONG_MESSAGE_FORBBIDEN);
    // Test Show
    rspCmd = "sccp lmr show";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, "key=1  firstSpc=11, lastSpc=12, ruleType=LONG_MESSAGE_FORBBIDEN\n");
    rspCmd = "sccp lmr create 2 13 14 xudt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 2);
    lmr = this.router.getLongMessageRule(2);
    assertEquals(lmr.getFirstSpc(), 13);
    assertEquals(lmr.getLastSpc(), 14);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.XUDT_ENABLED);
    rspCmd = "sccp lmr create 3 15 16 ludt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 3);
    lmr = this.router.getLongMessageRule(3);
    assertEquals(lmr.getFirstSpc(), 15);
    assertEquals(lmr.getLastSpc(), 16);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LUDT_ENABLED);
    rspCmd = "sccp lmr create 4 17 18 ludt_segm";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 17);
    assertEquals(lmr.getLastSpc(), 18);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LUDT_ENABLED_WITH_SEGMENTATION);
    rspCmd = "sccp lmr create 4 19 20 ludt_segm";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertTrue(res.equals(SccpOAMMessage.LMR_ALREADY_EXIST));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    rspCmd = "sccp lmr modify 4 21 22 udt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 21);
    assertEquals(lmr.getLastSpc(), 22);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LONG_MESSAGE_FORBBIDEN);
    rspCmd = "sccp lmr modify 4 21 22 xudt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 21);
    assertEquals(lmr.getLastSpc(), 22);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.XUDT_ENABLED);
    rspCmd = "sccp lmr modify 4 21 22 ludt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 21);
    assertEquals(lmr.getLastSpc(), 22);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LUDT_ENABLED);
    rspCmd = "sccp lmr modify 4 21 22 ludt_segm";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 21);
    assertEquals(lmr.getLastSpc(), 22);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LUDT_ENABLED_WITH_SEGMENTATION);
    rspCmd = "sccp lmr modify 5 23 24 udt";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertTrue(res.equals(String.format(SccpOAMMessage.LMR_DOESNT_EXIST,this.sccpStack.getName() )));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    lmr = this.router.getLongMessageRule(4);
    assertEquals(lmr.getFirstSpc(), 21);
    assertEquals(lmr.getLastSpc(), 22);
    assertEquals(lmr.getLongMessageRuleType(), LongMessageRuleType.LUDT_ENABLED_WITH_SEGMENTATION);
    rspCmd = "sccp lmr show 1";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    rspCmd = "sccp lmr show";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    rspCmd = "sccp lmr delete 10";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertTrue(res.equals(String.format(SccpOAMMessage.LMR_DOESNT_EXIST,this.sccpStack.getName() )));
    assertEquals(this.router.getLongMessageRules().size(), 4);
    rspCmd = "sccp lmr delete 4";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.router.getLongMessageRules().size(), 3);
}