@Test public void testCanParse() { String sdp1 = "v=123\n\r"; String sdp2 = "x=123\n\r"; String sdp3 = "v=abc\n\r"; String sdp4 = "v=123 213\n\r"; boolean canParseSdp1 = parser.canParse(sdp1); boolean canParseSdp2 = parser.canParse(sdp2); boolean canParseSdp3 = parser.canParse(sdp3); boolean canParseSdp4 = parser.canParse(sdp4); Assert.assertTrue(canParseSdp1); Assert.assertFalse(canParseSdp2); Assert.assertFalse(canParseSdp3); Assert.assertFalse(canParseSdp4); }
@Override public boolean canParse(String sdp) { if (sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }
VersionFieldParser implements SdpParser<VersionField> { @Override public boolean canParse(String sdp) { if (sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); } }
VersionFieldParser implements SdpParser<VersionField> { @Override public boolean canParse(String sdp) { if (sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  }
VersionFieldParser implements SdpParser<VersionField> { @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 VersionField parse(String sdp); @Override void parse(VersionField field, String sdp); }
VersionFieldParser implements SdpParser<VersionField> { @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 VersionField parse(String sdp); @Override void parse(VersionField field, String sdp);  }