class SimplePhenotypeRepresentation implements PhenotypeRepresentation {

    public double[] getDoubleValue() {
        if (this.representation != null){
            return Arrays.copyOf(this.representation, this.representation.length);
        } else {
            return new double[0];
        }

    }

}

class SimplePhenotypeRepresentationTest  {

    protected PhenotypeRepresentation representation;

    @Test
    // test that arrays are equal but not the same
    public void testGetDoubleValue() throws Exception {

        double[] input = new double[]{1.2, 4.8, 6.3, 9.9, 10E18};
        this.representation.setDoubleValue(input);
        double[] output = this.representation.getDoubleValue();
        Assert.assertArrayEquals(input, output, 0.0d);
        Assert.assertNotSame(input, output);
    }

}