AttributeMutation implements JsonSerializable { @NonNull public static AttributeMutation newSetAttributeMutation(@NonNull String key, @NonNull JsonValue jsonValue, long timestamp) { if (jsonValue.isNull() || jsonValue.isJsonList() || jsonValue.isJsonMap() || jsonValue.isBoolean()) { throw new IllegalArgumentException("Invalid attribute value: " + jsonValue); } return new AttributeMutation(ATTRIBUTE_ACTION_SET, key, jsonValue, DateUtils.createIso8601TimeStamp(timestamp)); } AttributeMutation(@NonNull String action,
                      @NonNull String key,
                      @Nullable JsonValue value,
                      @Nullable String timestamp); @NonNull static AttributeMutation newSetAttributeMutation(@NonNull String key, @NonNull JsonValue jsonValue, long timestamp); @NonNull static AttributeMutation newRemoveAttributeMutation(@NonNull String key, long timestamp); @NonNull @Override JsonValue toJsonValue(); @NonNull static List<AttributeMutation> collapseMutations(@NonNull List<AttributeMutation> mutations); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void testThrowsBoolean() { AttributeMutation.newSetAttributeMutation("something", JsonValue.wrapOpt(true), 100); }