@@ -0,0 +1,1271 @@
+package timeseries;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0A%0Aimport org.junit.Test;%0A%0Apublic class TimeUnitSpec %7B%0A  %0A  @Test%0A  public void whenTimeUnitFrequencyTimeScaleComputedThenResultCorrect() %7B%0A    TimeUnit timeUnit = TimeUnit.MONTH;%0A    TimeScale timeScale = new TimeScale(TimeUnit.QUARTER, 2);%0A    assertThat(timeUnit.frequencyPer(timeScale), is(equalTo(6.0)));%0A  %7D%0A%0A  @Test%0A  public void whenMillisecondTimeUnitFrequencyWithSecondsScaleThenResultCorrect() %7B%0A    TimeUnit timeUnit = TimeUnit.MILLISECOND;%0A    TimeScale timeScale = new TimeScale(TimeUnit.SECOND, 5);%0A    assertThat(timeUnit.frequencyPer(timeScale), is(equalTo(5E3)));%0A  %7D%0A%0A  @Test%0A  public void whenNanoSecondTimeUnitFrequencyWithMicrosecondUnitThenResultCorrect() %7B%0A    TimeUnit nanosecond = TimeUnit.NANOSECOND;%0A    TimeUnit microsecond = TimeUnit.MICROSECOND;%0A    assertThat(nanosecond.frequencyPer(microsecond), is(closeTo(1E3, 1E-10)));%0A  %7D%0A  %0A  @Test%0A  public void whenNanoSecondTimeUnitFrequencyWithMicrosecondScaleThenResultCorrect() %7B%0A    TimeUnit nanosecond = TimeUnit.NANOSECOND;%0A    TimeScale microsecond = new TimeScale(TimeUnit.MICROSECOND, 50);%0A    assertThat(nanosecond.frequencyPer(microsecond), is(closeTo(50E3, 1E-10)));%0A  %7D%0A%7D%0A

Add TimeUnit test class.