@@ -0,0 +1,2757 @@
+package no.ssb.vtl.script.error;%0A%0A/*%0A * ========================LICENSE_START=================================%0A * Java VTL%0A * %25%25%0A * Copyright (C) 2016 - 2017 Hadrien Kohl%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * =========================LICENSE_END==================================%0A */%0A%0Aimport org.antlr.v4.runtime.ParserRuleContext;%0Aimport org.antlr.v4.runtime.Token;%0Aimport org.junit.Test;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class VTLScriptExceptionTest %7B%0A%0A    @Test%0A    public void testContextWithStartStop() throws Exception %7B%0A%0A        ParserRuleContext context = mock(ParserRuleContext.class);%0A        Token start = mock(Token.class);%0A        Token stop = mock(Token.class);%0A%0A        when(start.getCharPositionInLine()).thenReturn(1);%0A        when(stop.getCharPositionInLine()).thenReturn(2);%0A%0A        when(start.getLine()).thenReturn(3);%0A        when(stop.getLine()).thenReturn(4);%0A%0A        when(context.getStart()).thenReturn(start);%0A        when(context.getStop()).thenReturn(stop);%0A%0A        VTLScriptException exception = new VTLScriptException(%22user defined message%22, context);%0A%0A        assertThat(exception.getStartColumn()).isEqualTo(1);%0A        assertThat(exception.getStopColumn()).isEqualTo(2);%0A        assertThat(exception.getStartLine()).isEqualTo(3);%0A        assertThat(exception.getStopLine()).isEqualTo(4);%0A%0A    %7D%0A%0A    @Test%0A    public void testContextWithSameStartStop() throws Exception %7B%0A%0A        ParserRuleContext context = mock(ParserRuleContext.class);%0A        Token token = mock(Token.class);%0A%0A        when(token.getCharPositionInLine()).thenReturn(0);%0A        when(token.getLine()).thenReturn(0);%0A%0A        when(context.getStart()).thenReturn(token);%0A        when(context.getStop()).thenReturn(token);%0A%0A        when(token.getText()).thenReturn(%22token%22);%0A%0A        VTLScriptException exception = new VTLScriptException(%22user defined message%22, context);%0A%0A        assertThat(exception.getStartColumn()).isEqualTo(0);%0A        assertThat(exception.getStopColumn()).isEqualTo(5);%0A        assertThat(exception.getStartLine()).isEqualTo(0);%0A        assertThat(exception.getStopLine()).isEqualTo(0);%0A%0A    %7D%0A%7D%0A

Add test for the different start and stop tokens context can return