// Path: enip-core/src/test/java/com/digitalpetri/enip/SerializationTest.java
// public abstract class SerializationTest<T> {
// 
//     protected ByteBuf buffer;
// 
//     @BeforeMethod
//     public void setUp() {
//         buffer = Unpooled.buffer();
//     }
// 
//     @AfterMethod
//     public void tearDown() {
//         ReferenceCountUtil.release(buffer);
//     }
// 
//     protected T encodeDecode(T toEncode,
//                              BiConsumer<T, ByteBuf> encoder,
//                              Function<ByteBuf, T> decoder) {
//         encoder.accept(toEncode, buffer);
//         return decoder.apply(buffer);
//     }
// 
// }


import com.digitalpetri.enip.SerializationTest;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
package com.digitalpetri.enip.cpf;



public class UnconnectedDataItemResponseTest extends SerializationTest<UnconnectedDataItemResponse> {

    @Test(dataProvider = "getData")
    public void testSerialization(ByteBuf data) {
        data.retain();
        data.markReaderIndex();

        UnconnectedDataItemResponse item = new UnconnectedDataItemResponse(data);
        UnconnectedDataItemResponse decoded = encodeDecode(item, UnconnectedDataItemResponse::encode, UnconnectedDataItemResponse::decode);

// Path: enip-core/src/test/java/com/digitalpetri/enip/SerializationTest.java
// public abstract class SerializationTest<T> {
// 
//     protected ByteBuf buffer;
// 
//     @BeforeMethod
//     public void setUp() {
//         buffer = Unpooled.buffer();
//     }
// 
//     @AfterMethod
//     public void tearDown() {
//         ReferenceCountUtil.release(buffer);
//     }
// 
//     protected T encodeDecode(T toEncode,
//                              BiConsumer<T, ByteBuf> encoder,
//                              Function<ByteBuf, T> decoder) {
//         encoder.accept(toEncode, buffer);
//         return decoder.apply(buffer);
//     }
// 
// }


// Path: enip-core/src/test/java/com/digitalpetri/enip/cpf/UnconnectedDataItemResponseTest.java
import com.digitalpetri.enip.SerializationTest;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;

package com.digitalpetri.enip.cpf;



public class UnconnectedDataItemResponseTest extends SerializationTest<UnconnectedDataItemResponse> {

    @Test(dataProvider = "getData")
    public void testSerialization(ByteBuf data) {
        data.retain();
        data.markReaderIndex();

        UnconnectedDataItemResponse item = new UnconnectedDataItemResponse(data);
        UnconnectedDataItemResponse decoded = encodeDecode(item, UnconnectedDataItemResponse::encode, UnconnectedDataItemResponse::decode);

        data.resetReaderIndex();