SearchModeConverter implements Converter { @Override public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object obj) { if (obj instanceof SearchMode) { return ((SearchMode) obj).name(); } return obj.toString(); }  @Override Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value); @Override String getAsString(FacesContext facesContext, UIComponent uiComponent, Object obj);  }
@Test public void testGetAsString_1() throws Exception { SearchModeConverter fixture = new SearchModeConverter(); String result = fixture.getAsString(null, null, SearchMode.all); assertNotNull(result); }