TimeDurationConverter implements Converter { @Override public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object obj) { String ret = ""; if (obj instanceof Number) { ret = TimeFormatUtil.formatTime(((Number) obj).intValue()); } return ret; }  @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 { TimeDurationConverter fixture = new TimeDurationConverter(); FacesContext facesContext = FacesContext.getCurrentInstance(); UIComponent uiComponent = new DynaForm(); Object obj = new Byte((byte) 1); String result = fixture.getAsString(facesContext, uiComponent, obj); assertNotNull(result); }
@Test public void testGetAsString_2() throws Exception { TimeDurationConverter fixture = new TimeDurationConverter(); FacesContext facesContext = FacesContext.getCurrentInstance(); UIComponent uiComponent = new DynaForm(); Object obj = new Object(); String result = fixture.getAsString(facesContext, uiComponent, obj); assertNotNull(result); }