public static StatTriggerInstruction statTrigger(Map<StatTriggerField, Long> statTriggerMap,
                                                     StatTriggerFlag flag) {
        checkNotNull(statTriggerMap, "Stat trigger map cannot be null");
        checkNotNull(flag, "Stat trigger flag  cannot be null");
        return new StatTriggerInstruction(statTriggerMap, flag);
    }
@Test
    public void testStatTriggerTrafficMethod() {
        final Instruction instruction = Instructions.statTrigger(statTriggerFieldMap1, flag1);
        final Instructions.StatTriggerInstruction statTriggerInstruction =
                checkAndConvert(instruction,
                        Instruction.Type.STAT_TRIGGER,
                        Instructions.StatTriggerInstruction.class);
        assertThat(statTriggerInstruction.getStatTriggerFieldMap(), is(equalTo(statTriggerFieldMap1)));
        assertThat(statTriggerInstruction.getStatTriggerFlag(), is(equalTo(flag1)));
        assertThat(statTriggerInstruction.getStatTriggerFieldMap(), is(not(equalTo(statTriggerFieldMap2))));
        assertThat(statTriggerInstruction.getStatTriggerFlag(), is(not(equalTo(flag2))));
    }