SetHeaderCellValueCommand extends AbstractScenarioGridCommand { protected void validateInstanceHeader(ScenarioSimulationContext context, String headerCellValue, int columnIndex) throws Exception { List<String> instanceNameElements = Collections.unmodifiableList(Arrays.asList(headerCellValue.split("\\."))); boolean isADataType = !headerCellValue.endsWith(".") && instanceNameElements.size() == 1 && context.getDataObjectFieldsMap().containsKey(instanceNameElements.get(0)); context.getAbstractScesimGridModelByGridWidget(gridWidget).validateInstanceHeaderUpdate(headerCellValue, columnIndex, isADataType); } SetHeaderCellValueCommand(GridWidget gridWidget, boolean isInstanceHeader, boolean isPropertyHeader); private  SetHeaderCellValueCommand();   }
@Test public void validateInstanceHeader() throws Exception { commonValidateInstanceHeader(false); commonValidateInstanceHeader(true); }