### Question:
HeartbeatIntervalVariableAccessor extends VariableAccessor { public void setActualValue(AttributePath attributePath, CiString.CiString1000 attributeValue) { Station station = getStation(); station.updateHeartbeat(Integer.parseInt(attributeValue.toString())); } HeartbeatIntervalVariableAccessor(Station station, StationStore stationStore); @Override String getVariableName(); @Override Map<AttributeType, VariableGetter> getVariableGetters(); @Override Map<AttributeType, VariableSetter> getVariableSetters(); @Override Map<AttributeType, SetVariableValidator> getVariableValidators(); @Override List<ReportDatum> generateReportData(String componentName); @Override boolean isMutable(); void setActualValue(AttributePath attributePath, CiString.CiString1000 attributeValue); static final String NAME; }### Answer:
@Test void shouldSetActualValue() { Component component = new Component().withName(new CiString.CiString50(OCPPCommCtrlrComponent.NAME)); Variable variable = new Variable().withName(new CiString.CiString50(HeartbeatIntervalVariableAccessor.NAME)); SetVariableDatum.AttributeType attributeType = SetVariableDatum.AttributeType.ACTUAL; int heartbeatInterval = 100; variableAccessor.setActualValue(new AttributePath(component, variable, attributeType), new CiString.CiString1000(String.valueOf(heartbeatInterval))); verify(stationMock).updateHeartbeat(eq(heartbeatInterval)); }