@Test(expected = JsonKeyInvalidException.class)
public void createTooLargeAttribute() {

    final String invalidAttribute = generateStringExceedingMaxLength();
    final JsonObject jsonObject = JsonFactory.newObjectBuilder()
            .set(invalidAttribute, JsonFactory.newObject())
            .build();
    ThingsModelFactory.newAttributes(jsonObject);
}