package uk.ac.ebi.atlas.bioentity;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.ui.Model;
import org.springframework.validation.support.BindingAwareModelMap;

import javax.inject.Inject;

import static org.junit.Assert.assertTrue;

@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(locations = {"classpath:applicationContext.xml", "classpath:solrContext.xml", "classpath:dbContext.xml"})
public class GeneSetPageControllerIT {

    @Inject
    GeneSetPageController subject;

    @Test
    public void bioentityPropertiesOfVariousTypes() throws Exception {


        bioentityProperties("GO:0016746");
        bioentityProperties("R-HSA-73887");
        bioentityProperties("PO:0009025");

    }

    private void bioentityProperties(String bioentityIdentifier){
        Model model = new BindingAwareModelMap();
        subject.showGeneSetPage(bioentityIdentifier, "",model);

        JsonArray bioentityProperties = new Gson().fromJson((String) model.asMap().get("bioentityProperties"), JsonArray.class);

        assertTrue(bioentityIdentifier+" should have one sad property" , bioentityProperties.size()==1);
    }

}
@@ -482,16 +482,56 @@
 nject;%0A%0A
+import static org.hamcrest.Matchers.is;%0A
 import s
@@ -560,19 +560,19 @@
 .assertT
-rue
+hat
 ;%0A%0A@RunW
@@ -924,18 +924,16 @@
 ption %7B%0A
-%0A%0A
         
@@ -1054,17 +1054,16 @@
 9025%22);%0A
-%0A
     %7D%0A%0A 
@@ -1237,16 +1237,17 @@
  %22%22,
+ 
 model);%0A
 %0A   
@@ -1242,17 +1242,16 @@
 model);%0A
-%0A
         
@@ -1371,17 +1371,16 @@
 class);%0A
-%0A
         
@@ -1390,66 +1390,12 @@
 ertT
-rue(bioentityIdentifier+%22 should have one sad property%22 , 
+hat(
 bioe
@@ -1420,11 +1420,15 @@
 ze()
-==1
+, is(1)
 );%0A 

Replace assertTrue with assertThat