Manual port of: FBTest for issue 4009