### Question:
StockPortfolioItem implements Serializable { public BigDecimal getValue() { if (shareCount == null || lastPrice == null) { return null; } return this.lastPrice.multiply(this.shareCount); } StockPortfolioItem(String symbol, BigDecimal shareCount, Date dateAdded); Long getId(); void setId(Long id); String getSymbol(); BigDecimal getLastPrice(); void setLastPrice(BigDecimal lastPrice); void updatePrice(StockPrice stockPrice); Date getDateAdded(); BigDecimal getShareCount(); BigDecimal getValue();  }### Answer:
@Test public void when_last_price_is_null_the_value_should_be_null() throws Exception { StockPortfolioItem item = preparePortfolioItem(); assertThat(item.getValue(), nullValue()); }