@Test public void testId() { final DefaultAlarm a = generate(); assertThat(a.id(), is(AlarmId.NONE)); final DefaultAlarm b = new DefaultAlarm.Builder(a).withId(ALARM_ID).build(); assertEquals("id ignored in equals", a, b); assertNotEquals(ALARM_ID, a.id()); assertEquals(ALARM_ID, b.id()); assertEquals(ALARM_ENTITY_ID, b.source()); }
@Override public AlarmId id() { return id; }
DefaultAlarm implements Alarm { @Override public AlarmId id() { return id; } }
DefaultAlarm implements Alarm { @Override public AlarmId id() { return id; } DefaultAlarm(); private  DefaultAlarm(final AlarmId id,
                         final DeviceId deviceId,
                         final String description,
                         final AlarmEntityId source,
                         final long timeRaised,
                         final long timeUpdated,
                         final Long timeCleared,
                         final SeverityLevel severity,
                         final boolean isServiceAffecting,
                         final boolean isAcknowledged,
                         final boolean isManuallyClearable,
                         final String assignedUser); }
DefaultAlarm implements Alarm { @Override public AlarmId id() { return id; } DefaultAlarm(); private  DefaultAlarm(final AlarmId id,
                         final DeviceId deviceId,
                         final String description,
                         final AlarmEntityId source,
                         final long timeRaised,
                         final long timeUpdated,
                         final Long timeCleared,
                         final SeverityLevel severity,
                         final boolean isServiceAffecting,
                         final boolean isAcknowledged,
                         final boolean isManuallyClearable,
                         final String assignedUser); @Override AlarmId id(); @Override DeviceId deviceId(); @Override String description(); @Override AlarmEntityId source(); @Override long timeRaised(); @Override long timeUpdated(); @Override Long timeCleared(); @Override SeverityLevel severity(); @Override boolean serviceAffecting(); @Override boolean acknowledged(); @Override boolean manuallyClearable(); @Override String assignedUser(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); }
DefaultAlarm implements Alarm { @Override public AlarmId id() { return id; } DefaultAlarm(); private  DefaultAlarm(final AlarmId id,
                         final DeviceId deviceId,
                         final String description,
                         final AlarmEntityId source,
                         final long timeRaised,
                         final long timeUpdated,
                         final Long timeCleared,
                         final SeverityLevel severity,
                         final boolean isServiceAffecting,
                         final boolean isAcknowledged,
                         final boolean isManuallyClearable,
                         final String assignedUser); @Override AlarmId id(); @Override DeviceId deviceId(); @Override String description(); @Override AlarmEntityId source(); @Override long timeRaised(); @Override long timeUpdated(); @Override Long timeCleared(); @Override SeverityLevel severity(); @Override boolean serviceAffecting(); @Override boolean acknowledged(); @Override boolean manuallyClearable(); @Override String assignedUser(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }