Fix JUnit failure caused by user agent filtering on the server side.

Adding Junit fix to branch.