// Path: src/main/java/org/struckture/base/exceptions/FieldConfigurationException.java
// public class FieldConfigurationException extends StruckException {
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public FieldConfigurationException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructor.
//      * @param message message
//      * @param cause cause
//      */
//     public FieldConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/struckture/base/exceptions/StrucktureReadException.java
// public class StrucktureReadException extends StruckException {
// 
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public StrucktureReadException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructor.
//      * @param message message
//      * @param cause cause
//      */
//     public StrucktureReadException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/struckture/base/exceptions/StructureConfigurationException.java
// public class StructureConfigurationException extends StruckException {
// 
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public StructureConfigurationException(String message) {
//         super(message);
//     }
// }


import org.struckture.base.annotations.StruckField;
import org.struckture.base.annotations.Struckture;
import org.struckture.base.exceptions.FieldConfigurationException;
import org.struckture.base.exceptions.StrucktureReadException;
import org.struckture.base.exceptions.StructureConfigurationException;
import org.junit.Test;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.io.InputStream;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.junit.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
        //expect exception
    }

    @Struckture(length = 0x8)
    private static class UnknownTypeFieldTestStructure {
        @StruckField(offset = 4)
        private Object object;
    }

    @Test(expected = FieldConfigurationException.class)
    public void shouldThrowExceptionWhenUnknownType() {
        //given

        //when
        Strucktor.forClass(UnknownTypeFieldTestStructure.class);

        //then
        //expect exception
    }

    @Struckture(length = 0x8)
    private static class BadConstructorStructure {
        @StruckField(offset = 4)
        private int integer;

        public BadConstructorStructure () {
            throw new NotImplementedException();
        }
    }

// Path: src/main/java/org/struckture/base/exceptions/FieldConfigurationException.java
// public class FieldConfigurationException extends StruckException {
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public FieldConfigurationException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructor.
//      * @param message message
//      * @param cause cause
//      */
//     public FieldConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/struckture/base/exceptions/StrucktureReadException.java
// public class StrucktureReadException extends StruckException {
// 
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public StrucktureReadException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructor.
//      * @param message message
//      * @param cause cause
//      */
//     public StrucktureReadException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/struckture/base/exceptions/StructureConfigurationException.java
// public class StructureConfigurationException extends StruckException {
// 
//     /**
//      * Constructor.
//      * @param message message
//      */
//     public StructureConfigurationException(String message) {
//         super(message);
//     }
// }


// Path: src/test/java/org/struckture/base/StrucktureStruckTest.java
import org.struckture.base.annotations.StruckField;
import org.struckture.base.annotations.Struckture;
import org.struckture.base.exceptions.FieldConfigurationException;
import org.struckture.base.exceptions.StrucktureReadException;
import org.struckture.base.exceptions.StructureConfigurationException;
import org.junit.Test;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.io.InputStream;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.junit.MatcherAssert.assertThat;
import static org.junit.Assert.fail;

        //expect exception
    }

    @Struckture(length = 0x8)
    private static class UnknownTypeFieldTestStructure {
        @StruckField(offset = 4)
        private Object object;
    }

    @Test(expected = FieldConfigurationException.class)
    public void shouldThrowExceptionWhenUnknownType() {
        //given

        //when
        Strucktor.forClass(UnknownTypeFieldTestStructure.class);

        //then
        //expect exception
    }

    @Struckture(length = 0x8)
    private static class BadConstructorStructure {
        @StruckField(offset = 4)
        private int integer;

        public BadConstructorStructure () {
            throw new NotImplementedException();
        }
    }

    @Test(expected = StrucktureReadException.class)