title: JUnit test data in static or non static methods
body: <p>Like to know which one is good.</p>
  <p>I have to keep some JUnit test data in a different file. Lets call it as <code>TestingData.java</code>. I thought of doing it in two ways.</p>
  <h2>First Way</h2>
  <p><strong>TestingData.java</strong></p>
  <pre><code>public class TestingData {
    protected String getHelloWorld() {
      return &quot;Hello World&quot;;
    }
  }
  </code></pre>
  <h2>Second Way</h2>
  <p><strong>TestingData.java</strong></p>
  <pre><code>public class TestingData {
    public static String getHelloWorld() {
      return &quot;Hello World&quot;;
    }
  }
  </code></pre>
  <p>I can call the <strong>First Way</strong> like this in my testing service by extends <code>TestingData</code> class</p>
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class SomeServiceTest extends TestingData {
    @Test
    public void helloWorldTest() {
      assertEquals(&quot;Hello World&quot;, getHelloWorld());
    }
  }
  </code></pre>
  <p>calling <strong>Second Way</strong> in my testing service by calling the static function <code>TestingData.getHelloWorld()</code></p>
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class SomeServiceTest {
    @Test
    public void helloWorldTest() {
      assertEquals(&quot;Hello World&quot;, TestingData.getHelloWorld());
    }
  }
  </code></pre>
  <p>Like to know which way is better in clean code principle</p>