### Question:
DynamicReadOnlyUtils { public static boolean isOnlyVisualChangeAllowed(final GridWidget gridWidget) { if (gridWidget instanceof BaseGrid) { final BaseGrid baseGrid = (BaseGrid) gridWidget; return baseGrid.isOnlyVisualChangeAllowed(); } return false; }  static boolean isOnlyVisualChangeAllowed(final GridWidget gridWidget);  }### Answer:
@Test public void testGridWidget() { assertThat(DynamicReadOnlyUtils.isOnlyVisualChangeAllowed(mock(GridWidget.class))).isFalse(); }
@Test public void testBaseGrid() { when(gridWidget.isOnlyVisualChangeAllowed()).thenReturn(false); assertThat(DynamicReadOnlyUtils.isOnlyVisualChangeAllowed(gridWidget)).isFalse(); }
@Test public void testBaseGridWhenOnlyVisualChangeAllowed() { when(gridWidget.isOnlyVisualChangeAllowed()).thenReturn(true); assertThat(DynamicReadOnlyUtils.isOnlyVisualChangeAllowed(gridWidget)).isTrue(); }