### Question:
Heartbeats { public void addOrChangeHeartbeat(Heartbeat heartbeat, ACS acs) throws SQLException { if (!acs.getUser().isUnittypeAdmin(unittype.getId())) { throw new IllegalArgumentException("Not allowed action for this user"); } heartbeat.validateInput(true); heartbeat.validate(); addOrChangeHeartbeatImpl(heartbeat, acs); idMap.put(heartbeat.getId(), heartbeat); nameMap.put(heartbeat.getName(), heartbeat); } Heartbeats(
      Map<Integer, Heartbeat> idMap, Map<String, Heartbeat> nameMap, Unittype unittype); Heartbeat getById(Integer id); Heartbeat getByName(String name); Heartbeat[] getHeartbeats(); @Override String toString(); void addOrChangeHeartbeat(Heartbeat heartbeat, ACS acs); void deleteHeartbeat(Heartbeat heartbeat, ACS acs);  }### Answer:
@Test public void addOrChangeHeartbeat() {}