FuturesUtil { public static String getOneDigitYearString(int year) { String yearString = Integer.toString(year); return yearString.substring(yearString.length() - 1); }  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 testGetOneDigitYearString() { assertEquals("7", FuturesUtil.getOneDigitYearString(2017)); assertEquals("7", FuturesUtil.getOneDigitYearString(17)); }