@@ -0,0 +1,2696 @@
+/*%0A *   Copyright (C) 2016  Datamatica (dev@datamatica.pl)%0A *%0A *   This program is free software: you can redistribute it and/or modify%0A *   it under the terms of the GNU Affero General Public License as published%0A *   by the Free Software Foundation, either version 3 of the License, or%0A *   (at your option) any later version.%0A *%0A *   This program is distributed in the hope that it will be useful,%0A *   but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A *   GNU Affero General Public License for more details.%0A *%0A *   You should have received a copy of the GNU Affero General Public License%0A *   along with this program. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage pl.datamatica.traccar.api.services;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A *%0A * @author Jan Usarek%0A */%0Apublic class SimpleCommandParserTest %7B%0A%0A    @Test%0A    public void testWithoutParameters() %7B%0A        final IDeviceCommandParser cmdParser = new SimpleCommandParser();%0A        final Map%3CString, Object%3E commandParams = new HashMap%3C%3E();%0A%0A        assertEquals(%22GPRSET#%22,%0A                cmdParser.parse(%22GPRSET#%22, commandParams));%0A    %7D%0A    %0A    @Test%0A    public void testWithOneParameter() %7B%0A        final IDeviceCommandParser cmdParser = new SimpleCommandParser();%0A        final Map%3CString, Object%3E commandParams = new HashMap%3CString, Object%3E() %7B%0A            %7B%0A                put(%22frequency%22, %2220%22);%0A            %7D%0A        %7D;%0A%0A        assertEquals(%22run,20%22,%0A                cmdParser.parse(%22run,%7Bfrequency%7D%22, commandParams));%0A    %7D%0A    %0A    @Test%0A    public void testWithTwoParameters() %7B%0A        final IDeviceCommandParser cmdParser = new SimpleCommandParser();%0A        final Map%3CString, Object%3E commandParams = new HashMap%3CString, Object%3E() %7B%0A            %7B%0A                put(%22frequency%22, %2230%22);%0A                put(%22frequencyStop%22, %22300%22);%0A            %7D%0A        %7D;%0A%0A        assertEquals(%22TIMER,30,300#%22,%0A                cmdParser.parse(%22TIMER,%7Bfrequency%7D,%7BfrequencyStop%7D#%22, commandParams));%0A    %7D%0A    %0A    @Test%0A    public void testWithTwoManyParameters() %7B%0A        final IDeviceCommandParser cmdParser = new SimpleCommandParser();%0A        final Map%3CString, Object%3E commandParams = new HashMap%3CString, Object%3E() %7B%0A            %7B%0A                put(%22frequency%22, %2220%22);%0A                put(%22frequencyStop%22, %22600%22);%0A                put(%22password%22, %22111111%22);%0A                put(%22number%22, %22499001002%22);%0A            %7D%0A        %7D;%0A%0A        assertEquals(%22TIMER,20,600#%22,%0A                cmdParser.parse(%22TIMER,%7Bfrequency%7D,%7BfrequencyStop%7D#%22, commandParams));%0A    %7D%0A%7D%0A

Add SimpleCommandParser tests.