@Test public void nullIdThrows() { assertThatNullPointerException().isThrownBy(() -> LeaderId.create((String) null)); }
public static LeaderId create(Config config) { try { return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH)); } catch (Exception e) { throw new IllegalArgumentException("Invalid '" + LEADER_ID_CONFIG_PATH + "'", e); } }
LeaderId { public static LeaderId create(Config config) { try { return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH)); } catch (Exception e) { throw new IllegalArgumentException("Invalid '" + LEADER_ID_CONFIG_PATH + "'", e); } } }
LeaderId { public static LeaderId create(Config config) { try { return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH)); } catch (Exception e) { throw new IllegalArgumentException("Invalid '" + LEADER_ID_CONFIG_PATH + "'", e); } } private  LeaderId(String id); }
LeaderId { public static LeaderId create(Config config) { try { return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH)); } catch (Exception e) { throw new IllegalArgumentException("Invalid '" + LEADER_ID_CONFIG_PATH + "'", e); } } private  LeaderId(String id); static LeaderId create(Config config); static LeaderId create(String id); String getId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
LeaderId { public static LeaderId create(Config config) { try { return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH)); } catch (Exception e) { throw new IllegalArgumentException("Invalid '" + LEADER_ID_CONFIG_PATH + "'", e); } } private  LeaderId(String id); static LeaderId create(Config config); static LeaderId create(String id); String getId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final LeaderId NO_LEADER; static final LeaderId UNKNOWN; }