@Test public void testConstruct_setType_nullType() { Tx tx = new Tx(); boolean exceptionOccured = false; try { tx.setMsgType(null); } catch (IllegalArgumentException e) { exceptionOccured = true; } assertTrue(exceptionOccured); }
public void setMsgType(TxMessageType type) { if (type == null) throw new IllegalArgumentException("Type cannot be null"); this.msgType = type; }
Tx implements Serializable { public void setMsgType(TxMessageType type) { if (type == null) throw new IllegalArgumentException("Type cannot be null"); this.msgType = type; } }
Tx implements Serializable { public void setMsgType(TxMessageType type) { if (type == null) throw new IllegalArgumentException("Type cannot be null"); this.msgType = type; } Tx();  Tx(TxMessageType msgType, Map<String, TxDetail> details); }
Tx implements Serializable { public void setMsgType(TxMessageType type) { if (type == null) throw new IllegalArgumentException("Type cannot be null"); this.msgType = type; } Tx();  Tx(TxMessageType msgType, Map<String, TxDetail> details); TxMessageType getMsgType(); void setMsgType(TxMessageType type); void setDetails(Map<String, TxDetail> details); Map<String, TxDetail> getDetails(); @JsonIgnore TxDetail getDetail(TxDetailType detailType); @JsonIgnore TxDetail getDetail(String detailName); @Override String toString(); }
Tx implements Serializable { public void setMsgType(TxMessageType type) { if (type == null) throw new IllegalArgumentException("Type cannot be null"); this.msgType = type; } Tx();  Tx(TxMessageType msgType, Map<String, TxDetail> details); TxMessageType getMsgType(); void setMsgType(TxMessageType type); void setDetails(Map<String, TxDetail> details); Map<String, TxDetail> getDetails(); @JsonIgnore TxDetail getDetail(TxDetailType detailType); @JsonIgnore TxDetail getDetail(String detailName); @Override String toString();  }