SolarFluxCorrectionFactorCalculator { public static synchronized int getNumDaysInTheYear(int year) { cal.set(GregorianCalendar.YEAR, year); return cal.get(Calendar.DAY_OF_YEAR); }  static double computeFactorFor(ProductData.UTC startTime, ProductData.UTC endTime); static double computeFactorFor(ProductData.UTC time); static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end); static synchronized int getNumDaysInTheYear(int year);  }
@Test public void testGetNumDaysForTheYear() { assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2007)); assertEquals(366, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2008)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2009)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2010)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2011)); assertEquals(366, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2012)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2013)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2014)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2015)); assertEquals(366, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2016)); assertEquals(365, SolarFluxCorrectionFactorCalculator.getNumDaysInTheYear(2017)); }