DomHandlerConverter { public static final HandlerModel convert(final DomHandlerType type) { if (DomHandlerType.BLUR == type) return HandlerModel.HANDLER_DOM_BLUR; else if (DomHandlerType.CHANGE_HANDLER == type) return HandlerModel.HANDLER_DOM_CHANGE_HANDLER; else if (DomHandlerType.CLICK == type) return HandlerModel.HANDLER_DOM_CLICK; else if (DomHandlerType.CONTEXT_MENU == type) return HandlerModel.HANDLER_DOM_CONTEXT_MENU; else if (DomHandlerType.DOUBLE_CLICK == type) return HandlerModel.HANDLER_DOM_DOUBLE_CLICK; else if (DomHandlerType.DRAG_END == type) return HandlerModel.HANDLER_DOM_DRAG_END; else if (DomHandlerType.DRAG_ENTER == type) return HandlerModel.HANDLER_DOM_DRAG_ENTER; else if (DomHandlerType.DRAG_LEAVE == type) return HandlerModel.HANDLER_DOM_DRAG_LEAVE; else if (DomHandlerType.DRAG_OVER == type) return HandlerModel.HANDLER_DOM_DRAG_OVER; else if (DomHandlerType.DRAG_START == type) return HandlerModel.HANDLER_DOM_DRAG_START; else if (DomHandlerType.DROP == type) return HandlerModel.HANDLER_DOM_DROP; else if (DomHandlerType.FOCUS == type) return HandlerModel.HANDLER_DOM_FOCUS; else if (DomHandlerType.KEY_DOWN == type) return HandlerModel.HANDLER_DOM_KEY_DOWN; else if (DomHandlerType.KEY_PRESS == type) return HandlerModel.HANDLER_DOM_KEY_PRESS; else if (DomHandlerType.KEY_UP == type) return HandlerModel.HANDLER_DOM_KEY_UP; else if (DomHandlerType.MOUSE_DOWN == type) return HandlerModel.HANDLER_DOM_MOUSE_DOWN; else if (DomHandlerType.MOUSE_OUT == type) return HandlerModel.HANDLER_DOM_MOUSE_OUT; else if (DomHandlerType.MOUSE_OVER == type) return HandlerModel.HANDLER_DOM_MOUSE_OVER; else if (DomHandlerType.MOUSE_UP == type) return HandlerModel.HANDLER_DOM_MOUSE_UP; else if (DomHandlerType.MOUSE_WHELL == type) return HandlerModel.HANDLER_DOM_MOUSE_WHELL; else throw new IllegalArgumentException("Undefined DomHandlerType : " + type); }  static final HandlerModel convert(final DomHandlerType type); static final DomHandlerType convert(final HandlerModel type);  }
@Test public void testConvertHandlerModel() { final HandlerModel type = DomHandlerConverter.convert(DomHandlerType.MOUSE_WHELL); assertEquals(HandlerModel.HANDLER_DOM_MOUSE_WHELL, type); }
@Test public void testConvertDomHandlerType() { final DomHandlerType type = DomHandlerConverter.convert(HandlerModel.HANDLER_DOM_MOUSE_WHELL); assertEquals(DomHandlerType.MOUSE_WHELL, type); }