@Override
  public void populate(final HttpServletRequest source, final DeviceData target)
      throws ConversionException {
    final Device device = deviceResolver.resolveDevice(source);

    target.setUserAgent(source.getHeader("User-Agent"));
    target.setDesktopBrowser(Boolean.valueOf(device.isNormal()));
    target.setTabletBrowser(Boolean.valueOf(device.isTablet()));
    target.setMobileBrowser(Boolean.valueOf(device.isMobile()));
  }
 public String toStringDeviceData(final DeviceData device) {
   final StringBuilder builder = new StringBuilder(73);
   builder.append("[DeviceData ");
   builder.append("id").append('=').append(device.getId()).append(", ");
   builder.append("userAgent").append('=').append(device.getUserAgent()).append(", ");
   builder.append("capabilities").append('=').append(device.getCapabilities()).append(", ");
   builder.append("desktop").append('=').append(device.getDesktopBrowser()).append(", ");
   builder.append("mobile").append('=').append(device.getMobileBrowser()).append(", ");
   builder.append("tablet").append('=').append(device.getTabletBrowser()).append(", ");
   builder.append(']');
   return builder.toString();
 }