package uk.ac.ebi.phenotype.stats;

import static org.junit.Assert.assertTrue;

import java.util.Date;
import java.util.List;

import org.apache.solr.client.solrj.SolrServerException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:app-config.xml" })
@TransactionConfiguration
@Transactional
public class ObservationServiceTest {

	@Autowired
	private ObservationService os;

	@Test
	public void testGetControls() throws SolrServerException {
		List<ObservationDTO> test = os.getControls("ESLIM_001_001_158", "MGI:3028467", 7, new Date());
		assertTrue(test.size()>0);
	}

	@Test
	public void testGetUrl() throws SolrServerException {
		
		String url = os.getUnidimensionalQueryStringByParameterGeneAccZygosityOrganisationStrain(new Integer(1), "MGI:88255", "homozygous", new Integer(3), "MGI:2159965");
		
		System.out.println(url);
		assertTrue(url.length()>0);
		
	}

}

@@ -173,24 +173,49 @@
 rException;%0A
+import org.junit.Ignore;%0A
 import org.j
@@ -829,32 +829,41 @@
 ice os;%0A%0A%09@Test%0A
+%09@Ignore%0A
 %09public void tes
@@ -906,16 +906,16 @@
 ption %7B%0A
-
 %09%09List%3CO
@@ -1036,16 +1036,217 @@
 0);%0A%09%7D%0A%0A
+%09@Test%0A%09public void testGetControlsDate() throws SolrServerException %7B%0A%09%09List%3CObservationDTO%3E test = os.getControls(%22ESLIM_003_001_012%22, %22MGI:1922257%22, 7, new Date());%0A%09%09assertTrue(test.size()%3E0);%0A%09%7D%0A%0A
 %09@Test%0A%09
@@ -1302,16 +1302,16 @@
 on %7B%0A%09%09%0A
+
 %09%09String
@@ -1327,22 +1327,8 @@
 .get
-Unidimensional
 Quer

change test method to match new method name