@@ -0,0 +1,1523 @@
+package uk.ac.ebi.quickgo.ontology.common;%0A%0Aimport uk.ac.ebi.quickgo.ontology.common.coterm.CoTermLimit;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0A%0A/**%0A * @author Tony Wardell%0A * Date: 10/10/2016%0A * Time: 10:50%0A * Created with IntelliJ IDEA.%0A */%0Apublic class CoTermLimitTest %7B%0A%0A    CoTermLimit comTermLimit;%0A%0A    @Before%0A    public void setup()%7B%0A        comTermLimit = new CoTermLimit(50);%0A    %7D%0A%0A    @Test%0A    public void limitIsConstructorLimitIfRequestedLimitIsNull()%7B%0A        assertThat(comTermLimit.workoutLimit(null), is(50));%0A    %7D%0A%0A    @Test%0A    public void limitIsConstructorLimitIfRequestedLimitIsZero()%7B%0A        assertThat(comTermLimit.workoutLimit(%220%22), is(50));%0A    %7D%0A%0A    @Test%0A    public void limitIsIntegerMaxIfRequestedLimitIsFull()%7B%0A        assertThat(comTermLimit.workoutLimit(%22ALL%22), is(Integer.MAX_VALUE));%0A    %7D%0A%0A    @Test%0A    public void argumentOfAllIsNotCaseSensitive()%7B%0A        assertThat(comTermLimit.workoutLimit(%22alL%22), is(Integer.MAX_VALUE));%0A    %7D%0A%0A    @Test%0A    public void integerAsArgumentGetsCreatedAsLimit()%7B%0A        assertThat(comTermLimit.workoutLimit(%2237%22), is(37));%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void notANumberAsArgumentThrowsException()%7B%0A        comTermLimit.workoutLimit(%22boo%22);%0A    %7D%0A%0A    @Test%0A    public void limitIsConstructorLimitIfRequestedLimitIsEmptyString()%7B%0A        assertThat(comTermLimit.workoutLimit(%22   %22), is(50));%0A    %7D%0A%7D%0A

Test the CoTermLimit class.