add testcase for ticket 1987
solved ticket https://issues.jboss.org/browse/RAILO-1987