ElementBuilder implements ElementMutation<T> { @Override public boolean hasChanges() { if (properties.size() > 0) { return true; } if (propertyDeletes.size() > 0) { return true; } if (propertySoftDeletes.size() > 0) { return true; } if (extendedDatas.size() > 0) { return true; } if (extendedDataDeletes.size() > 0) { return true; } if (markPropertyHiddenMutations.size() > 0) { return true; } if (markPropertyVisibleMutations.size() > 0) { return true; } return false; } protected  ElementBuilder(ElementType elementType, String elementId, Visibility elementVisibility); @Override ElementType getElementType(); @Override Visibility getVisibility(); @Override String getId(); @Deprecated String getElementId(); ElementBuilder<T> setProperty(String name, Object value, Visibility visibility); ElementBuilder<T> setProperty(String name, Object value, Metadata metadata, Visibility visibility); ElementBuilder<T> addPropertyValue(String key, String name, Object value, Visibility visibility); ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility); @Override ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility); @Override ElementBuilder<T> deleteProperty(Property property); @Override ElementBuilder<T> deleteProperty(String name, Visibility visibility); @Override ElementBuilder<T> deleteProperty(String key, String name, Visibility visibility); @Override ElementBuilder<T> softDeleteProperty(Property property, Object eventData); @Override ElementBuilder<T> softDeleteProperty(String name, Visibility visibility, Object eventData); @Override ElementBuilder<T> softDeleteProperty(String key, String name, Visibility visibility, Object eventData); @Override ElementBuilder<T> addExtendedData(String tableName, String row, String column, Object value, Visibility visibility); @Override ElementMutation<T> addExtendedData(String tableName, String row, String column, Object value, Long timestamp, Visibility visibility); @Override ElementBuilder<T> addExtendedData(String tableName, String row, String column, String key, Object value, Visibility visibility); @Override ElementBuilder<T> addExtendedData(String tableName, String row, String column, String key, Object value, Long timestamp, Visibility visibility); @Override ElementBuilder<T> deleteExtendedData(String tableName, String row, String column, Visibility visibility); @Override ElementBuilder<T> deleteExtendedData(String tableName, String row, String column, String key, Visibility visibility); @Override ElementMutation<T> addAdditionalVisibility(String visibility, Object eventData); @Override ElementMutation<T> deleteAdditionalVisibility(String visibility, Object eventData); @Override ElementMutation<T> addExtendedDataAdditionalVisibility(
        String tableName,
        String row,
        String additionalVisibility,
        Object eventData
    ); @Override ElementMutation<T> deleteExtendedDataAdditionalVisibility(
        String tableName,
        String row,
        String additionalVisibility,
        Object eventData
    ); @Override ElementMutation<T> markPropertyHidden(
        String key,
        String name,
        Visibility propertyVisibility,
        Long timestamp,
        Visibility visibility,
        Object eventData
    ); @Override ElementMutation<T> markPropertyVisible(
        String key,
        String name,
        Visibility propertyVisibility,
        Long timestamp,
        Visibility visibility,
        Object eventData
    ); abstract T save(Authorizations authorizations); @Override Iterable<Property> getProperties(); @Override Iterable<PropertyDeleteMutation> getPropertyDeletes(); @Override Iterable<PropertySoftDeleteMutation> getPropertySoftDeletes(); @Override Iterable<ExtendedDataMutation> getExtendedData(); @Override Iterable<ExtendedDataDeleteMutation> getExtendedDataDeletes(); @Override List<AdditionalVisibilityAddMutation> getAdditionalVisibilities(); @Override List<AdditionalVisibilityDeleteMutation> getAdditionalVisibilityDeletes(); @Override List<AdditionalExtendedDataVisibilityAddMutation> getAdditionalExtendedDataVisibilities(); @Override List<AdditionalExtendedDataVisibilityDeleteMutation> getAdditionalExtendedDataVisibilityDeletes(); @Override List<MarkPropertyHiddenMutation> getMarkPropertyHiddenMutations(); @Override List<MarkPropertyVisibleMutation> getMarkPropertyVisibleMutations(); Set<String> getAdditionalVisibilitiesAsStringSet(); @Override IndexHint getIndexHint(); ImmutableSet<String> getExtendedDataTableNames(); @Override ElementMutation<T> setIndexHint(IndexHint indexHint); @Override boolean hasChanges();  }
@Test public void testEmptyMutationHasChanges() { assertFalse("should not have changes", mutation.hasChanges()); }