@Test public void testConstruct_setName_nullName() { TxDetail detail = new TxDetail(); boolean exceptionOccured = false; try { detail.setDetailName(null); } catch (IllegalArgumentException e) { exceptionOccured = true; } assertTrue(exceptionOccured); }
public void setDetailName(String detailName) { if (detailName == null || detailName.isEmpty()) throw new IllegalArgumentException("Detail name cannot be null or empty"); this.detailName = detailName; }
TxDetail implements Serializable { public void setDetailName(String detailName) { if (detailName == null || detailName.isEmpty()) throw new IllegalArgumentException("Detail name cannot be null or empty"); this.detailName = detailName; } }
TxDetail implements Serializable { public void setDetailName(String detailName) { if (detailName == null || detailName.isEmpty()) throw new IllegalArgumentException("Detail name cannot be null or empty"); this.detailName = detailName; } TxDetail();  TxDetail(TxDetailType detailName, String detailValue);  TxDetail(String detailName, String detailValue); }
TxDetail implements Serializable { public void setDetailName(String detailName) { if (detailName == null || detailName.isEmpty()) throw new IllegalArgumentException("Detail name cannot be null or empty"); this.detailName = detailName; } TxDetail();  TxDetail(TxDetailType detailName, String detailValue);  TxDetail(String detailName, String detailValue); void setDetailName(String detailName); String getDetailName(); void setDetailValue(String detailValue); String getDetailValue(); @Override String toString(); }
TxDetail implements Serializable { public void setDetailName(String detailName) { if (detailName == null || detailName.isEmpty()) throw new IllegalArgumentException("Detail name cannot be null or empty"); this.detailName = detailName; } TxDetail();  TxDetail(TxDetailType detailName, String detailValue);  TxDetail(String detailName, String detailValue); void setDetailName(String detailName); String getDetailName(); void setDetailValue(String detailValue); String getDetailValue(); @Override String toString();  }