package com.hazelcast.client.impl.protocol.codec;

import com.hazelcast.test.HazelcastTestSupport;
import org.junit.Test;

public class StackTraceElementCodecTest extends HazelcastTestSupport {

    @Test
    public void testConstructor() throws Exception {
        assertUtilityConstructor(StackTraceElementCodec.class);
    }
}

@@ -69,256 +69,2503 @@
 ast.
-test.HazelcastTestSupport;%0Aimport org.junit.Test;%0A%0Apublic class StackTraceElementCodecTest extends HazelcastTestSupport %7B%0A%0A    @Test%0A    public void testConstructor() throws Exception %7B%0A        assertUtilityConstructor(StackTraceElementCodec.class)
+client.impl.protocol.ClientMessage;%0Aimport com.hazelcast.test.HazelcastParallelClassRunner;%0Aimport com.hazelcast.test.HazelcastTestSupport;%0Aimport com.hazelcast.test.annotation.ParallelTest;%0Aimport com.hazelcast.test.annotation.QuickTest;%0Aimport org.junit.Test;%0Aimport org.junit.experimental.categories.Category;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static org.junit.Assert.assertArrayEquals;%0A%0A@RunWith(HazelcastParallelClassRunner.class)%0A@Category(%7BQuickTest.class, ParallelTest.class%7D)%0Apublic class StackTraceElementCodecTest extends HazelcastTestSupport %7B%0A%0A    @Test%0A    public void testConstructor() %7B%0A        assertUtilityConstructor(StackTraceElementCodec.class);%0A    %7D%0A%0A    @Test%0A    public void testEncodeDecodeStackTrace() %7B%0A        StackTraceElement%5B%5D stackTrace = new Throwable().getStackTrace();%0A        testEncodeDecodeStackTrace(stackTrace);%0A    %7D%0A%0A    private void testEncodeDecodeStackTrace(StackTraceElement%5B%5D stackTrace) %7B%0A        int size = 0;%0A        for (StackTraceElement stackTraceElement : stackTrace) %7B%0A            size += StackTraceElementCodec.calculateDataSize(stackTraceElement);%0A        %7D%0A%0A        ClientMessage clientMessage = ClientMessage.createForEncode(size);%0A        for (StackTraceElement stackTraceElement : stackTrace) %7B%0A            StackTraceElementCodec.encode(stackTraceElement, clientMessage);%0A        %7D%0A%0A        ClientMessage clientMessage2 = ClientMessage.createForDecode(clientMessage.buffer(), 0);%0A        StackTraceElement%5B%5D stackTrace2 = new StackTraceElement%5BstackTrace.length%5D;%0A%0A        for (int i = 0; i %3C stackTrace.length; i++) %7B%0A            stackTrace2%5Bi%5D = StackTraceElementCodec.decode(clientMessage2);%0A        %7D%0A%0A        assertArrayEquals(stackTrace, stackTrace2);%0A    %7D%0A%0A    @Test%0A    public void testEncodeDecodeStackTraceWithNullFileName() %7B%0A        StackTraceElement%5B%5D stackTrace = new Throwable().getStackTrace();%0A        stackTrace = nullifyFileNames(stackTrace);%0A%0A        testEncodeDecodeStackTrace(stackTrace);%0A    %7D%0A%0A    private StackTraceElement%5B%5D nullifyFileNames(StackTraceElement%5B%5D stackTrace) %7B%0A        StackTraceElement%5B%5D stackTraceWithNullFileName = new Throwable().getStackTrace();%0A        int i = 0;%0A        for (StackTraceElement stackTraceElement : stackTrace) %7B%0A            stackTraceWithNullFileName%5Bi++%5D = new StackTraceElement(stackTraceElement.getClassName(),%0A                    stackTraceElement.getMethodName(), null, stackTraceElement.getLineNumber());%0A        %7D%0A        return stackTraceWithNullFileName
 ;%0A  

Add test for StackTraceElemetCodec