public static DeviceKey createDeviceKeyUsingUsernamePassword(DeviceKeyId id, String label,
                                                                 String username, String password) {
        DefaultAnnotations annotations = builder().set(AnnotationKeys.USERNAME, username)
                .set(AnnotationKeys.PASSWORD, password).build();

        return new DeviceKey(id, label, Type.USERNAME_PASSWORD, annotations);
    }
@Test(expected = NullPointerException.class)
    public void testCreateDeviceKeyUsingUsernamePasswordWithNull() {
        DeviceKey deviceKey = DeviceKey.createDeviceKeyUsingUsernamePassword(null, null, null, null);
    }