FLUID-5287: Added a unit test to demonstrate FLUID-5287 issue

The detail of the issue: http://issues.fluidproject.org/browse/FLUID-5287

This pull request needs to be merged in with a fix for itself.