LogicalClassifierDataGetter { public List<Action> getEgressActionsForTunnelInterface(String theTunnelInterface, int actionOffset) { return theGeniusRpcClient.getEgressActionsFromGeniusRPC(theTunnelInterface, true, actionOffset) .orElse(Collections.emptyList()); } private  LogicalClassifierDataGetter();  LogicalClassifierDataGetter(SfcGeniusRpcClient theRpcClient); Optional<String> getInterfaceBetweenDpnIds(DpnIdType srcDpnId, DpnIdType dstDpnId); List<Action> getEgressActionsForTunnelInterface(String theTunnelInterface, int actionOffset); Optional<String> getNodeName(String theInterfaceName); Optional<DpnIdType> getFirstHopDataplaneId(RenderedServicePath theRsp); Optional<DpnIdType> getHopDataplaneId(RenderedServicePathHop hopData); static Optional<Long> getOpenflowPort(String theInterfaceName); static DpnIdType getDpnIdFromNodeName(String theNodeName);  }
@Test public void getEgressActionsForTunnelPositive() { Assert.assertNotNull(dataGetter.getEgressActionsForTunnelInterface(FIRST_SF_TUNNEL_IF, 0)); Assert.assertFalse(dataGetter.getEgressActionsForTunnelInterface(FIRST_SF_TUNNEL_IF, 0).isEmpty()); }
@Test public void getEgressActionsForTunnelNegative() { when(geniusRpc.getEgressActionsFromGeniusRPC(anyString(), any(Boolean.class), any(Integer.class))) .thenReturn(Optional.empty()); Assert.assertNotNull(dataGetter.getEgressActionsForTunnelInterface(FIRST_SF_TUNNEL_IF, 0)); Assert.assertTrue(dataGetter.getEgressActionsForTunnelInterface(FIRST_SF_TUNNEL_IF, 0).isEmpty()); }