Fixed unit test and related issues for bug 447996

Signed-off-by: sguan <sguan@actuate.com>