ONOS-866: Refactor the storing and handling of BgpSession info.

Moved the local and remote BGP session info to a separate class BgpSessionInfo.
No functional changes.

Also, removed methods TestBgpPeerChannelHandler.prepareBgpKeepalive(),
prepareBgpNotification() and prepareBgpMessage() from the unit tests.
Instead, use the corresponding methods in the BGP implementation itself
to generate the BGP messages.

Change-Id: I7f4b6ad4f6995c242cd8a9848ea527b1fcac9c11
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
index 096605a..11a8b5e 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
@@ -179,13 +179,13 @@
             assertThat(result, is(true));
 
             for (BgpSession bgpSession : bgpSessionManager.getBgpSessions()) {
-                if (bgpSession.getRemoteBgpId().equals(BGP_PEER1_ID)) {
+                if (bgpSession.remoteInfo().bgpId().equals(BGP_PEER1_ID)) {
                     bgpSession1 = bgpSession;
                 }
-                if (bgpSession.getRemoteBgpId().equals(BGP_PEER2_ID)) {
+                if (bgpSession.remoteInfo().bgpId().equals(BGP_PEER2_ID)) {
                     bgpSession2 = bgpSession;
                 }
-                if (bgpSession.getRemoteBgpId().equals(BGP_PEER3_ID)) {
+                if (bgpSession.remoteInfo().bgpId().equals(BGP_PEER3_ID)) {
                     bgpSession3 = bgpSession;
                 }
             }
@@ -394,7 +394,7 @@
         assertThat(bgpSession2, notNullValue());
         assertThat(bgpSession3, notNullValue());
         for (BgpSession bgpSession : bgpSessionManager.getBgpSessions()) {
-            long sessionAs = TestUtils.getField(bgpSession, "localAs");
+            long sessionAs = bgpSession.localInfo().asNumber();
             assertThat(sessionAs, is(TestBgpPeerChannelHandler.PEER_AS));
         }
     }