SimplePosition extends DirectBean implements Position, MutableUniqueIdentifiable, Serializable { public void setQuantity(BigDecimal quantity) { JodaBeanUtils.notNull(quantity, "quantity"); this._quantity = quantity; } SimplePosition();  SimplePosition(BigDecimal quantity, ExternalId securityKey);  SimplePosition(BigDecimal quantity, ExternalIdBundle securityKey);  SimplePosition(UniqueId uniqueId, BigDecimal quantity, ExternalId securityKey);  SimplePosition(UniqueId uniqueId, BigDecimal quantity, ExternalIdBundle securityKey);  SimplePosition(UniqueId uniqueId, BigDecimal quantity, Security security);  SimplePosition(final Position copyFrom); @Override Security getSecurity(); void addTrade(Trade trade); boolean removeTrade(Trade trade); void addAttribute(String key, String value); void removeAttribute(final String key); @Override String toString(); static SimplePosition.Meta meta(); @Override SimplePosition.Meta metaBean(); @Override UniqueId getUniqueId(); @Override void setUniqueId(UniqueId uniqueId); final Property<UniqueId> uniqueId(); @Override BigDecimal getQuantity(); void setQuantity(BigDecimal quantity); final Property<BigDecimal> quantity(); @Override SecurityLink getSecurityLink(); void setSecurityLink(SecurityLink securityLink); final Property<SecurityLink> securityLink(); @Override Collection<Trade> getTrades(); void setTrades(Collection<Trade> trades); final Property<Collection<Trade>> trades(); @Override Map<String, String> getAttributes(); void setAttributes(Map<String, String> attributes); final Property<Map<String, String>> attributes(); @Override SimplePosition clone(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test(expectedExceptions=IllegalArgumentException.class) public void test_setQuantity_null() { SimplePosition test = new SimplePosition(UniqueId.of("B", "C"), BigDecimal.ONE, ExternalId.of("A", "B")); test.setQuantity(null); }