package org.traccar.helper;

import org.junit.Assert;
import org.junit.Test;

public class ObdDecoderTest {
    
    @Test
    public void testDecode() {

        Assert.assertEquals(83, ObdDecoder.decode(0x01, "057b").getValue());
        Assert.assertEquals(1225, ObdDecoder.decode(0x01, "0C1324").getValue());
        Assert.assertEquals(20, ObdDecoder.decode(0x01, "0D14").getValue());
        Assert.assertEquals(64050, ObdDecoder.decode(0x01, "31fa32").getValue());
        Assert.assertEquals(25, ObdDecoder.decode(0x01, "2F41").getValue());

    }

}

@@ -550,10 +550,239 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testDecodeCodes() throws Exception %7B%0A        Assert.assertEquals(%22P0D14%22, ObdDecoder.decodeCodes(%220D14%22).getValue());%0A        Assert.assertEquals(%22dtcs%22, ObdDecoder.decodeCodes(%220D14%22).getKey());%0A    %7D%0A%0A
 %7D%0A

add test cases on decodeCodes