### Question:
LiteralExpressionGridRow extends BaseGridRow { @Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; } LiteralExpressionGridRow(); @Override double getHeight();  }### Answer:
@Test public void testEmptyRow() { final GridRow row = new LiteralExpressionGridRow(); assertThat(row.getHeight()).isEqualTo(DEFAULT_HEIGHT); }
@Test public void testGetHeightWithHasDynamicHeightCell() { final GridRow row = spy(new LiteralExpressionGridRow()); final Map<Integer, GridCell> cells = new HashMap<Integer, GridCell>() {{ put(0, new MockHasDynamicHeightCell<>(new BaseGridCellValue<>("cheese"))); put(1, new BaseGridCell<>(new BaseGridCellValue<>("cheese"))); }}; doReturn(cells).when(row).getCells(); assertThat(row.getHeight()).isEqualTo(CELL_HEIGHT); }
@Test public void testGetHeightWithoutHasDynamicHeightCell() { final GridRow row = spy(new LiteralExpressionGridRow()); final Map<Integer, GridCell> cells = new HashMap<Integer, GridCell>() {{ put(0, new BaseGridCell<>(new BaseGridCellValue<>("cheese"))); }}; doReturn(cells).when(row).getCells(); assertThat(row.getHeight()).isEqualTo(DEFAULT_HEIGHT); }