HullWhiteOneFactorVolatilityEntry implements ImmutableBean, Comparable<HullWhiteOneFactorVolatilityEntry> { public static HullWhiteOneFactorVolatilityEntry.Builder builder() { return new HullWhiteOneFactorVolatilityEntry.Builder(); } private  HullWhiteOneFactorVolatilityEntry(
      Tenor startTenor,
      Tenor endTenor,
      double volatility); @Override int compareTo(HullWhiteOneFactorVolatilityEntry that); static HullWhiteOneFactorVolatilityEntry.Meta meta(); static HullWhiteOneFactorVolatilityEntry.Builder builder(); @Override HullWhiteOneFactorVolatilityEntry.Meta metaBean(); @Override Property<R> property(String propertyName); @Override Set<String> propertyNames(); Tenor getStartTenor(); Tenor getEndTenor(); double getVolatility(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test(expectedExceptions = IllegalArgumentException.class) public void startTenorMustBeBeforeEnd() { HullWhiteOneFactorVolatilityEntry.builder() .startTenor(Tenor.ofDays(10)) .endTenor(Tenor.ofDays(5)) .volatility(1.0) .build(); }
@Test(expectedExceptions = IllegalArgumentException.class) public void startTenorCannotBeSameAsEnd() { HullWhiteOneFactorVolatilityEntry.builder() .startTenor(Tenor.ofDays(10)) .endTenor(Tenor.ofDays(10)) .volatility(1.0) .build(); }
@Test(expectedExceptions = IllegalArgumentException.class) public void startVolatilityCannotBeNegative() { HullWhiteOneFactorVolatilityEntry.builder() .startTenor(Tenor.ofDays(5)) .endTenor(Tenor.ofDays(10)) .volatility(-1.0) .build(); }