GICSCode implements ImmutableBean, Serializable { public static GICSCode of(final int code) { if ((code < 10) || (code > 99999999)) { throw new IllegalArgumentException("Code out of range: " + code); } return GICSCode.of(Integer.toString(code)); } @ImmutableConstructor private  GICSCode(final String code); static GICSCode of(final int code); static GICSCode of(final String code); String getClassificationName(); String getCode(); String getSector(); String getIndustryGroup(); String getIndustry(); String getSubIndustry(); static GICSCode.Meta meta(); @Override GICSCode.Meta metaBean(); @Override Property<R> property(String propertyName); @Override Set<String> propertyNames(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final String NAME; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCode() { GICSCode.of(null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testLowCode() { GICSCode.of(9); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testHighCode() { GICSCode.of(100000000); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInvalidCode() { GICSCode.of("1020304r"); }