@Test public void testCanParse() { String sdp1 = "a=rtcp:65000\n\r"; String sdp2 = "x=rtcp:65000\n\r"; String sdp3 = "a=rtcp:xyz\n\r"; String sdp4 = "a=rtcp:65000 xyz\n\r"; String sdp5 = "a=rtcp:65000 IN IP4 127.0.0.1\n\r"; String sdp6 = "a=rtcp:65000 IP4 127.0.0.1\n\r"; String sdp7 = "a=rtcp:65000 IN 127.0.0.1\n\r"; String sdp8 = "a=rtcp:65000 IN IP4 xyz\n\r"; boolean canParseSdp1 = parser.canParse(sdp1); boolean canParseSdp2 = parser.canParse(sdp2); boolean canParseSdp3 = parser.canParse(sdp3); boolean canParseSdp4 = parser.canParse(sdp4); boolean canParseSdp5 = parser.canParse(sdp5); boolean canParseSdp6 = parser.canParse(sdp6); boolean canParseSdp7 = parser.canParse(sdp7); boolean canParseSdp8 = parser.canParse(sdp8); Assert.assertTrue(canParseSdp1); Assert.assertFalse(canParseSdp2); Assert.assertFalse(canParseSdp3); Assert.assertFalse(canParseSdp4); Assert.assertTrue(canParseSdp5); Assert.assertFalse(canParseSdp6); Assert.assertFalse(canParseSdp7); Assert.assertFalse(canParseSdp8); }
@Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }
RtcpAttributeParser implements SdpParser<RtcpAttribute> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); } }
RtcpAttributeParser implements SdpParser<RtcpAttribute> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  }
RtcpAttributeParser implements SdpParser<RtcpAttribute> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  @Override boolean canParse(String sdp); @Override RtcpAttribute parse(String sdp); @Override void parse(RtcpAttribute field, String sdp); }
RtcpAttributeParser implements SdpParser<RtcpAttribute> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  @Override boolean canParse(String sdp); @Override RtcpAttribute parse(String sdp); @Override void parse(RtcpAttribute field, String sdp);  }