Make methods static
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / TimeCounterTest.java
index eac02f2c9faafc0cc4a2cbb4674e8d19c299898c..36386b0ad8b8f26d07993e0dc7c683268fb39f69 100644 (file)
@@ -23,7 +23,7 @@ public class TimeCounterTest {
     private TimeCounter timeCounter;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         timeCounter = new TimeCounter();
     }
 
@@ -32,18 +32,16 @@ public class TimeCounterTest {
      * - tm1 at time 2 ms
      * - tm2 at time 4 ms
      * - tm3 at time 9 ms
-     *
      * awaited average time:
      * - tm1 = 2/1 = 2 ms
      * - tm2 = 4/2 = 2 ms
      * - tm3 = 9/3 = 3 ms
-     *
      * But this times are only theoretical if whole test is executed without latency and atomically. Therefore awaited
      * average times can't be compared to exact values of awaited average time (therefore == was replaced with >=)
-     * @throws Exception
+     * @throws Exception if interrupted
      */
     @Test
-    public void testGetAverageTimeBetweenMarks() throws Exception {
+    public void testGetAverageTimeBetweenMarks() {
         Assert.assertEquals(0, timeCounter.getAverageTimeBetweenMarks());
         timeCounter.markStart();
         Assert.assertEquals(0, timeCounter.getAverageTimeBetweenMarks());
@@ -61,7 +59,7 @@ public class TimeCounterTest {
         Assert.assertTrue(timeCounter.getAverageTimeBetweenMarks() >= 3);
     }
 
-    private void zzz(long length) {
+    private static void zzz(long length) {
         try {
             Thread.sleep(length);
         } catch (InterruptedException e) {