### Question:
GatewayRuleConverter { static FlowRule toFlowRule( GatewayFlowRule rule) { return new FlowRule(rule.getResource()) .setControlBehavior(rule.getControlBehavior()) .setCount(rule.getCount()) .setGrade(rule.getGrade()) .setMaxQueueingTimeMs(rule.getMaxQueueingTimeoutMs()); } private  GatewayRuleConverter();   }### Answer:
@Test public void testConvertToFlowRule() { GatewayFlowRule rule = new GatewayFlowRule("routeId1") .setCount(10) .setControlBehavior(RuleConstant.CONTROL_BEHAVIOR_RATE_LIMITER) .setMaxQueueingTimeoutMs(1000); FlowRule flowRule = GatewayRuleConverter.toFlowRule(rule); assertEquals(rule.getResource(), flowRule.getResource()); assertEquals(rule.getCount(), flowRule.getCount(), 0.01); assertEquals(rule.getControlBehavior(), flowRule.getControlBehavior()); assertEquals(rule.getMaxQueueingTimeoutMs(), flowRule.getMaxQueueingTimeMs()); }