@@ -0,0 +1,1865 @@
+package uk.ac.ebi.atlas.tsne;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnitRunner;%0A%0Aimport java.util.concurrent.ThreadLocalRandom;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.IntStream;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class GeneExpressionDaoTest %7B%0A    private final static int NUM_CLUSTERS = 4;%0A    private final static int NUM_POINTS_PER_CLUSTER = 1000;%0A    private final static String EXPERIMENT_ACCESSION = %22E-FOOBAR%22;%0A%0A    @Mock%0A    TSnePlotDao tSnePlotDaoMock;%0A%0A    GeneExpressionDao subject;%0A%0A    private String cellName(int i) %7B%0A        return %22Cell %22 + Integer.toString(i);%0A    %7D%0A%0A    private ImmutableMap%3CString, TSnePoint%3E randomTSnePlotGenerator(int numPoints) %7B%0A        return ImmutableMap.copyOf(IntStream.range(0, numPoints).boxed().collect(Collectors.toMap(%0A                this::cellName,%0A                i -%3E TSnePoint.create(%0A                        ThreadLocalRandom.current().nextDouble(), ThreadLocalRandom.current().nextDouble(),%0A                        cellName(i)))));%0A    %7D%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        ImmutableMap%3CString, TSnePoint%3E tSnePlot = randomTSnePlotGenerator(NUM_CLUSTERS * NUM_POINTS_PER_CLUSTER);%0A        when(tSnePlotDaoMock.fetchTSnePlotPoints(EXPERIMENT_ACCESSION)).thenReturn(tSnePlot);%0A        subject = new GeneExpressionDao(tSnePlotDaoMock);%0A    %7D%0A%0A    @Test%0A    public void fetchGeneExpressionWithEmptyId() throws Exception %7B%0A        subject.fetchGeneExpression(EXPERIMENT_ACCESSION, %22%22).values().forEach(%0A                expression -%3E assertThat(expression, is(0.0))%0A        );%0A    %7D%0A%0A%7D

Add test to GeneExpressionDao I think the behaviour described will remain when it returns real data