@Test
public void testWithIcon() {

    DeviceIdentityBuilder b = new DeviceIdentityBuilder();
    DeviceIdentity di = b.withIcon(SimCapnometer.class, "co2.png").build();
    Assert.assertNotNull(di.icon.image.userData);
    Assert.assertEquals(16134, di.icon.image.userData.size());
}