Added tests for the before validator