package ie.lero.evoting.test.data;

import election.tally.AbstractBallotCounting;
import election.tally.AbstractCountStatus;
import election.tally.Ballot;
import election.tally.BallotBox;
import election.tally.BallotCounting;
import election.tally.Candidate;
import election.tally.Constituency;
import election.tally.Decision;

public class TestDataGenerator {
 
  public static AbstractBallotCounting getAbstractBallotCounting(int n) {
    return new BallotCounting();
  }

  public static byte[] getByteArray() {
    return new byte[0];
  }

  public static Constituency getConstituency(int n) {
    return new Constituency();
  }

  public static Ballot getBallot(int preferenceID) {
    // TODO Auto-generated method stub
    int[] list = new int[1];
    list[0] = preferenceID;
    return new Ballot(list);
  }

  public static Candidate getCandidate(int n) {
    // TODO Auto-generated method stub
    return new Candidate();
  }

  public static BallotBox getBallotBox(int n) {
    return new BallotBox();
  }

  public static int[] getIntArray() {
    return new int[0];
  }

  public static long[] getLongArray() {
    return new long[0];
  }

  public static Decision getDecision(int n) {
    return new Decision();
  }

  public static BallotCounting getBallotCounting(int n) {
    return new BallotCounting();
  }

  public static Object[] getIntArrayAsObject() {
    return new Object[0];
  }

  public static AbstractCountStatus getAbstractCountStatus(int n) {
    BallotCounting ballotCounting = new BallotCounting();
    return ballotCounting.getCountStatus();
  }
}

@@ -356,16 +356,174 @@
 tor %7B%0A %0A
+  // Singletons%0A  private static final BallotCounting BALLOT_COUNTING = new BallotCounting();%0A  private static final BallotBox BALLOT_BOX = new BallotBox();%0A%0A
   public
@@ -599,36 +599,31 @@
  return 
-new BallotCounting()
+BALLOT_COUNTING
 ;%0A  %7D%0A%0A 
@@ -837,47 +837,8 @@
 ) %7B%0A
-    // TODO Auto-generated method stub%0A
     
@@ -976,47 +976,8 @@
 ) %7B%0A
-    // TODO Auto-generated method stub%0A
     
@@ -1064,31 +1064,26 @@
  return 
-new BallotBox()
+BALLOT_BOX
 ;%0A  %7D%0A%0A 
@@ -1363,36 +1363,31 @@
  return 
-new BallotCounting()
+BALLOT_COUNTING
 ;%0A  %7D%0A%0A 
@@ -1569,36 +1569,31 @@
 nting = 
-new BallotCounting()
+BALLOT_COUNTING
 ;%0A    re

Use constants for singleton objects