Added unit test for the opt-in directive