PModeUtils { public static IPullRequestFlow getOutPullRequestFlow(final IPMode pmode) { final ILeg pullLeg = getOutPullLeg(pmode); return getOutPullRequestFlow(pullLeg); }  static boolean isHolodeckB2BInitiator(final IPMode pmode); static boolean doesHolodeckB2BPull(final IPMode pmode); static ILeg getLeg(final IMessageUnit m); static ILeg getSendLeg(final IPMode pmode); static ILeg getReceiveLeg(final IPMode pmode); static IPullRequestFlow getOutPullRequestFlow(final IPMode pmode); static IPullRequestFlow getOutPullRequestFlow(final ILeg leg); static boolean doesHolodeckB2BTrigger(final ILeg leg); static ILeg getInPullRequestLeg(IPMode pmode); static ILeg getOutPullLeg(final IPMode pmode);  }
@Test public void testGetOutPullRequestFlow() { PMode validPMode = new PMode(); validPMode.setMep(EbMSConstants.ONE_WAY_MEP); validPMode.setMepBinding(EbMSConstants.ONE_WAY_PULL); PartnerConfig initiator = new PartnerConfig(); validPMode.setInitiator(initiator); Leg leg = new Leg(); Protocol protocolConfig = new Protocol(); protocolConfig.setAddress("address"); leg.setProtocol(protocolConfig); PullRequestFlow prFlow = new PullRequestFlow(); leg.addPullRequestFlow(prFlow); validPMode.addLeg(leg); IPullRequestFlow requestFlow = PModeUtils.getOutPullRequestFlow(validPMode); assertNotNull(requestFlow); }
@Test public void testGetOutPullPushRequestFlow() { PMode validPMode = new PMode(); validPMode.setMep(EbMSConstants.TWO_WAY_MEP); validPMode.setMepBinding(EbMSConstants.TWO_WAY_PULL_PUSH); PartnerConfig initiator = new PartnerConfig(); validPMode.setInitiator(initiator); Leg leg = new Leg(); Protocol protocolConfig = new Protocol(); protocolConfig.setAddress("address"); leg.setProtocol(protocolConfig); PullRequestFlow prFlow = new PullRequestFlow(); leg.addPullRequestFlow(prFlow); validPMode.addLeg(leg); IPullRequestFlow requestFlow = PModeUtils.getOutPullRequestFlow(validPMode); assertNotNull(requestFlow); }
@Test public void testGetOutPushPullRequestFlow() { PMode validPMode = new PMode(); validPMode.setMep(EbMSConstants.TWO_WAY_MEP); validPMode.setMepBinding(EbMSConstants.TWO_WAY_PUSH_PULL); PartnerConfig responder = new PartnerConfig(); validPMode.setResponder(responder); validPMode.addLeg(new Leg()); PartnerConfig initiator = new PartnerConfig(); validPMode.setInitiator(initiator); Leg leg = new Leg(); Protocol protocolConfig = new Protocol(); protocolConfig.setAddress("address"); leg.setProtocol(protocolConfig); PullRequestFlow prFlow = new PullRequestFlow(); leg.addPullRequestFlow(prFlow); validPMode.addLeg(leg); IPullRequestFlow requestFlow = PModeUtils.getOutPullRequestFlow(validPMode); assertNotNull(requestFlow); }
@Test public void testGetOutPullPullRequestFlow() { PMode validPMode = new PMode(); validPMode.setMep(EbMSConstants.TWO_WAY_MEP); validPMode.setMepBinding(EbMSConstants.TWO_WAY_PULL_PULL); PartnerConfig responder = new PartnerConfig(); validPMode.setResponder(responder); validPMode.addLeg(new Leg()); PartnerConfig initiator = new PartnerConfig(); validPMode.setInitiator(initiator); Leg leg = new Leg(); Protocol protocolConfig = new Protocol(); protocolConfig.setAddress("address"); leg.setProtocol(protocolConfig); PullRequestFlow prFlow = new PullRequestFlow(); leg.addPullRequestFlow(prFlow); validPMode.addLeg(leg); IPullRequestFlow requestFlow = PModeUtils.getOutPullRequestFlow(validPMode); assertNotNull(requestFlow); }