SdpProcessor { public boolean containsMedia(String media, SessionDescription sdp) throws SdpException { Vector<MediaDescription> mds = sdp.getMediaDescriptions(false); for (MediaDescription m : mds) { if (m.getMedia().getMediaType().equalsIgnoreCase(media)) { return true; } } return false; } SdpProcessor(); boolean containsFormat(String format, SessionDescription sdp); boolean containsMedia(String media, SessionDescription sdp); void exclude(String f, SessionDescription sdp); void excludeAttribute(String id, MediaDescription m); boolean checkForMinimalOffer(SessionDescription sdp);  }
@Test public void testContainsMedia() throws Exception { assertTrue("Excepted audio descriptor", sdpProcessor.containsMedia("audio", sdp)); assertTrue("Excepted audio descriptor", sdpProcessor.containsMedia("AUDIO", sdp)); }