FuturesUtil { public static String getTwoDigitYearString(int year) { String yearString = Integer.toString(year); return yearString.substring(yearString.length() - 2); }  static String getFullFuturesSymbolWithTwoDigitYear( String ticker, int month, int year ); static String getFullFuturesSymbolWithOneDigitYear( String ticker, int month, int year ); static String getTwoDigitYearString(int year); static String getOneDigitYearString(int year); static String getContractMonthSymbol(int month); static String getMonthAbbreviation(int month);  }
@Test public void testGetTwoDigitYearString() { assertEquals("17", FuturesUtil.getTwoDigitYearString(2017)); assertEquals("17", FuturesUtil.getTwoDigitYearString(17)); }