TenorUtils { public static double getDaysInTenor(final Tenor tenor) { return tenor.getPeriod().getDays(); } protected  TenorUtils(); static double getDaysInTenor(final Tenor tenor); @Deprecated static ZonedDateTime getDateWithTenorOffset(final ZonedDateTime dateTime, final Tenor tenor); @Deprecated static double getTenorsInTenor(final Tenor first, final Tenor second);  }
@Test(expectedExceptions = IllegalStateException.class) public void testGetDaysInTenor() { assertEquals(1, TenorUtils.getDaysInTenor(Tenor.ONE_DAY), 0); assertEquals(2, TenorUtils.getDaysInTenor(Tenor.TWO_DAYS), 0); assertEquals(7, TenorUtils.getDaysInTenor(Tenor.ONE_WEEK), 0); assertEquals(0, TenorUtils.getDaysInTenor(Tenor.ONE_MONTH), 0); assertEquals(0, TenorUtils.getDaysInTenor(Tenor.ONE_YEAR), 0); TenorUtils.getDaysInTenor(Tenor.SN); }