@Test
public void deviceNameRenderingSerial() throws Exception {

  String serial = "123";
  IDevice d = createDevice(false, null, manufacturer, model, buildVersion, apiLevel, serial, IDevice.DeviceState.ONLINE);
  DeviceNameProperties deviceNameProperties = new DeviceNameProperties(model, manufacturer, buildVersion, apiLevel);
  SimpleColoredText target = new SimpleColoredText();
  DeviceRenderer.renderDeviceName(d, deviceNameProperties, target, true);
  String name = target.toString();
  // includes serial since we called the render method with show serial true
  assertEquals("Google Nexus 4 123 Android 4.2, API 17", name);
}