public static void assertBodyNotContains ( String msg , SipMessage sipMessage , String value ) { assertNotNull ( "Null assert object passed in" , sipMessage ) ; if ( sipMessage . getContentLength ( ) > 0 ) { String body = new String ( sipMessage . getRawContent ( ) ) ; if ( body . indexOf ( value ) != - 1 ) { fail ( msg ) ; } } assertTrue ( true ) ; }
Asserts that the body in the given SIP message does not contain the value given or that there is no body in the message . The assertion fails if the body is present and contains the value . Assertion failure output includes the given message text .