mock a directive