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

public void testRss() {

    String rspCmd = "sccp rss create 2 11 8 0";
    String res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    RemoteSubSystem rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 11);
    assertEquals(rss.getRemoteSsn(), 8);
    assertFalse(rss.getMarkProhibitedWhenSpcResuming());

    // Test show
    rspCmd = "sccp rss show";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, "key=2  rsp=11 rss=8 rss-flag=0 rss-prohibited=false\n");

    rspCmd = "sccp rss delete 5";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, String.format(SccpOAMMessage.RSS_DOESNT_EXIST, this.sccpStack.getName()));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 11);

    rspCmd = "sccp rss delete 2";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 0);

    rspCmd = "sccp rss create 2 12 8 0 prohibitedwhenspcresuming true";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, String.format(SccpOAMMessage.RSS_SUCCESSFULLY_ADDED, this.sccpStack.getName()));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 12);
    assertEquals(rss.getRemoteSsn(), 8);
    assertTrue(rss.getMarkProhibitedWhenSpcResuming());

    rspCmd = "sccp rss create 2 12 8 0";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertTrue(res.equals(SccpOAMMessage.RSS_ALREADY_EXIST));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 12);
    assertEquals(rss.getRemoteSsn(), 8);
    assertTrue(rss.getMarkProhibitedWhenSpcResuming());

    rspCmd = "sccp rss modify 2 13 18 0";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 13);
    assertEquals(rss.getRemoteSsn(), 18);
    assertFalse(rss.getMarkProhibitedWhenSpcResuming());

    rspCmd = "sccp rss modify 2 14 19 0 prohibitedwhenspcresuming true";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, String.format(SccpOAMMessage.RSS_SUCCESSFULLY_MODIFIED, this.sccpStack.getName()));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 14);
    assertEquals(rss.getRemoteSsn(), 19);
    assertTrue(rss.getMarkProhibitedWhenSpcResuming());

    rspCmd = "sccp rss modify 3 15 19 0 prohibitedwhenspcresuming true";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
    assertEquals(res, String.format(SccpOAMMessage.RSS_DOESNT_EXIST, this.sccpStack.getName()));
    assertEquals(this.sccpResource.getRemoteSsns().size(), 1);
    rss = this.sccpResource.getRemoteSsn(2);
    assertEquals(rss.getRemoteSpc(), 14);
    assertEquals(rss.getRemoteSsn(), 19);
    assertTrue(rss.getMarkProhibitedWhenSpcResuming());

    rspCmd = "sccp rss show 1";
    res = this.sccpExecutor.execute(rspCmd.split(" "));

    rspCmd = "sccp rss show 2";
    res = this.sccpExecutor.execute(rspCmd.split(" "));

    rspCmd = "sccp rss show";
    res = this.sccpExecutor.execute(rspCmd.split(" "));
}