### Question:
DRGElement extends NamedElement implements DynamicReadOnly,
                                                                 HasContentDefinitionId { @Override public void setAllowOnlyVisualChange(final boolean allowOnlyVisualChange) { this.allowOnlyVisualChange = allowOnlyVisualChange; } DRGElement();  DRGElement(final Id id,
                      final Description description,
                      final Name name); @Override void setAllowOnlyVisualChange(final boolean allowOnlyVisualChange); @Override boolean isAllowOnlyVisualChange(); @Override ReadOnly getReadOnly(final String fieldName); @Override String getContentDefinitionId(); @Override String getDiagramId(); @Override void setDiagramId(final String dmnDiagramId); @Override void setContentDefinitionId(final String contentDefinitionId); DocumentationLinksHolder getLinksHolder(); void setLinksHolder(final DocumentationLinksHolder linksHolder);  }### Answer:
@Test public void testGetReadOnlyNotSet() { drgElement.setAllowOnlyVisualChange(false); checkIfItIsNotSet("something"); }
@Test public void testGetReadOnlyWithReadOnlyValuesAndAllowOnlyVisualChangesNotSet() { drgElement.setAllowOnlyVisualChange(false); for (final String readonlyField : READONLY_FIELDS) { checkIfItIsNotSet(readonlyField); } }
@Test public void testGetReadOnlyWithReadOnlyValues() { drgElement.setAllowOnlyVisualChange(true); for (final String readonlyField : READONLY_FIELDS) { checkIfIsReadOnly(readonlyField); } }
@Test public void testGetReadOnlyWithNotReadOnlyValues() { drgElement.setAllowOnlyVisualChange(true); checkIfItIsNotReadOnly("Font"); checkIfItIsNotReadOnly("Something"); }