Unit tests for Before() functionality