public static void assertBodyContains ( String msg , SipMessage sipMessage , String value ) { assertNotNull ( "Null assert object passed in" , sipMessage ) ; assertBodyPresent ( msg , sipMessage ) ; String body = new String ( sipMessage . getRawContent ( ) ) ; if ( body . indexOf ( value ) != - 1 ) { assertTrue ( true ) ; return ; } fail ( msg ) ; }
Asserts that the given SIP message contains a body that includes the given value . The assertion fails if a body is not present in the message or is present but doesn t include the value . Assertion failure output includes the given message text .