### Question:
PersistentBase extends SpecificRecordBase implements
        Persistent { @Override public void setDirty() { ByteBuffer dirtyBytes = getDirtyBytes(); assert (dirtyBytes.position() == 0); for (int i = 0; i < dirtyBytes.limit(); i++) { dirtyBytes.put(i, (byte) -1); } } PersistentBase(); abstract int getFieldsCount(); @Override void clearDirty(); @Override void clearDirty(int fieldIndex); @Override void clearDirty(String field); @Override boolean isDirty(); @Override boolean isDirty(int fieldIndex); @Override boolean isDirty(String fieldName); @Override void setDirty(); @Override void setDirty(int fieldIndex); @Override void setDirty(String field); ByteBuffer getDirtyBytes(); void setDirtyBytes(ByteBuffer __g__dirty); @Override void clear(); @Override boolean equals(Object that); @Override List<Field> getUnmanagedFields(); @Override abstract Persistent clone();  }### Answer:
@Test public void testSetDirty() { WebPage page = WebPage.newBuilder().build(); assertEquals("Expected the new Persistent instance to not be dirty.", false, page.isDirty()) ; page.setDirty(); for (Field field : page.getSchema().getFields()) { assertEquals("The field " + field.name() + " is not dirty.", true, page.isDirty(field.name())); } }