@Test public void testExtractYearFromKey() { String key = "2015ne"; int year = DistrictHelper.extractYearFromKey(key); assertEquals(year, 2015); }
public static int extractYearFromKey(String key) { return Integer.parseInt(key.substring(0, 4)); }
DistrictHelper { public static int extractYearFromKey(String key) { return Integer.parseInt(key.substring(0, 4)); } }
DistrictHelper { public static int extractYearFromKey(String key) { return Integer.parseInt(key.substring(0, 4)); } private  DistrictHelper(); }
DistrictHelper { public static int extractYearFromKey(String key) { return Integer.parseInt(key.substring(0, 4)); } private  DistrictHelper(); static boolean validateDistrictKey(String key); static int extractYearFromKey(String key); static String extractAbbrevFromKey(String key); static String generateKey(String districtAbbrev, int year); }
DistrictHelper { public static int extractYearFromKey(String key) { return Integer.parseInt(key.substring(0, 4)); } private  DistrictHelper(); static boolean validateDistrictKey(String key); static int extractYearFromKey(String key); static String extractAbbrevFromKey(String key); static String generateKey(String districtAbbrev, int year);  }