Moving test data from main to another class in Java
<p>I have created a membership record system in Java and currently populate the hard coded test data within the main but wish to add this test data into a separate class and call that class in. Is it common to have a separate test data class or is this something which is initialised in the main?  Any ideas or sources you can point me to?  </p>

<p>Current Driver Class:</p>

<pre><code>public static void main(String[] args) {

Member jane = new Member ("jane");
Member alex = new Member ("alex");
Member mike = new Member ("mike");

Set&lt;Member&gt; members = new HashSet&lt;Member &gt;();
members.add(jane);
members.add(alex);
members.add(mike);
</code></pre>

<p>What I'd like to have is something like:</p>

<pre><code>public static void main(String[] args) {

TestData tdata1 = new TestData();
tdat1.TestData(); 


Public Class TestData {

Member jane = new Member ("jane");
Member alex = new Member ("alex");
Member mike = new Member ("mike");

Set&lt;Member&gt; members = new HashSet&lt;Member&gt;();
members.add(jane);
members.add(alex);
members.add(mike);
</code></pre>
