Body of the test 1: support of multiline header values.
SipHeader sh;
// Header's name / header's value to set / expected return value
String[][] strHeaders = {
{
"Subject",
"I know you're there,\r\n" +
"\tpick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
{
"Subject",
"I know you're there,\r\n" +
" pick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
{
"Subject",
"I know you're there,\r\n" +
" pick up the phone and talk to me!",
"I know you're there, pick up " +
"the phone and talk to me!"
},
{
"Subject",
"I know you're there,\n\r" +
"\tpick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
{
"Subject",
"I know you're there,\n" +
"\tpick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
{
"Subject",
"I know you're there,\r" +
"\tpick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
{
"Organization",
"Sun \n" + " Microsystems",
"Sun Microsystems"
},
{
"AnExtendedHeader",
"I know you're there,\r\n" +
" pick up the phone and talk to me!",
"I know you're there, pick up the phone and talk to me!"
},
};
for (int i = 0; i < strHeaders.length; i++) {
sh = createSipHeader(strHeaders[i][0], strHeaders[i][1]);
if (sh == null) {
return;
}
String val = sh.getValue();
assertEquals("Invalid header's value!", strHeaders[i][2], val);
} // end for