// Path: src/test/java/com/github/mjdbc/test/asset/model/BeanWithStaticFieldMapper.java
// public class BeanWithStaticFieldMapper {
// 
//     @Mapper
//     public static final DbMapper<BeanWithStaticFieldMapper> MAPPER_v1_1 = r -> null;
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/BeanWithStaticFieldMapperSql.java
// public interface BeanWithStaticFieldMapperSql {
// 
//     @Sql("SELECT 1")
//     BeanWithStaticFieldMapper select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/EmptyQuerySql.java
// public interface EmptyQuerySql {
// 
//     @Sql
//     void updateFirstNameWithReader();
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/EmptySql.java
// public interface EmptySql {
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/BeanWithNullMapperSql.java
// public interface BeanWithNullMapperSql {
// 
//     @Sql("SELECT 1")
//     NonStaticMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/DuplicateParametersSql.java
// public interface DuplicateParametersSql {
// 
//     @Sql("SELECT login FROM users WHERE id = :val AND login = :val")
//     void update(@Bind("val") UserId id, @Bind("val") String login);
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/IllegalParametersSql3.java
// public interface IllegalParametersSql3 {
// 
//     @Sql("SELECT login FROM users WHERE id = :?val")
//     void update(@Bind("?val") UserId id);
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonFinalMapperBeanSql.java
// public interface NonFinalMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonFinalMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonPublicMapperBeanSql.java
// public interface NonPublicMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonPublicMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonStaticMapperBeanSql.java
// public interface NonStaticMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonStaticMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/UnboundParameterSql.java
// public interface UnboundParameterSql {
// 
//     @Sql("SELECT 1")
//     void update(@Bind("p") Class c);
// }


import com.github.mjdbc.DbImpl;
import com.github.mjdbc.test.asset.model.BeanWithStaticFieldMapper;
import com.github.mjdbc.test.asset.model.ValidBean;
import com.github.mjdbc.test.asset.model.error.MultipleMappersBean;
import com.github.mjdbc.test.asset.sql.BeanWithStaticFieldMapperSql;
import com.github.mjdbc.test.asset.sql.EmptyQuerySql;
import com.github.mjdbc.test.asset.sql.EmptySql;
import com.github.mjdbc.test.asset.sql.ValidBeansSql;
import com.github.mjdbc.test.asset.sql.error.BeanWithNullMapperSql;
import com.github.mjdbc.test.asset.sql.error.DuplicateParametersSql;
import com.github.mjdbc.test.asset.sql.error.FakeGettersBeanSql;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql1;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql2;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql3;
import com.github.mjdbc.test.asset.sql.error.MissedParameterSql;
import com.github.mjdbc.test.asset.sql.error.MultipleMappersBean1Sql;
import com.github.mjdbc.test.asset.sql.error.NonFinalMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.NonPublicMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.NonStaticMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.UnboundBeanParameterSql;
import com.github.mjdbc.test.asset.sql.error.UnboundParameterSql;
import com.github.mjdbc.test.asset.sql.error.WildcardParametrizedReturnTypeSql;
import org.junit.Test;
            db.attachSql(IllegalParametersSql1.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
        try {
            db.attachSql(IllegalParametersSql2.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
        try {
            db.attachSql(IllegalParametersSql3.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
    }

    /**
     * Check that @Mapper annotation is supported
     */
    @Test
    public void checkMapperAnnotation() {
        ValidBean bean = db.attachSql(ValidBeansSql.class).selectABean();
        assertEquals(1, bean.value);
    }

    /**
     * Check that multiple mapper variants triggers error
     */
    @Test(expected = IllegalArgumentException.class)
    public void multipleMappersThrowsException1() {
// Path: src/test/java/com/github/mjdbc/test/asset/model/BeanWithStaticFieldMapper.java
// public class BeanWithStaticFieldMapper {
// 
//     @Mapper
//     public static final DbMapper<BeanWithStaticFieldMapper> MAPPER_v1_1 = r -> null;
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/BeanWithStaticFieldMapperSql.java
// public interface BeanWithStaticFieldMapperSql {
// 
//     @Sql("SELECT 1")
//     BeanWithStaticFieldMapper select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/EmptyQuerySql.java
// public interface EmptyQuerySql {
// 
//     @Sql
//     void updateFirstNameWithReader();
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/EmptySql.java
// public interface EmptySql {
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/BeanWithNullMapperSql.java
// public interface BeanWithNullMapperSql {
// 
//     @Sql("SELECT 1")
//     NonStaticMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/DuplicateParametersSql.java
// public interface DuplicateParametersSql {
// 
//     @Sql("SELECT login FROM users WHERE id = :val AND login = :val")
//     void update(@Bind("val") UserId id, @Bind("val") String login);
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/IllegalParametersSql3.java
// public interface IllegalParametersSql3 {
// 
//     @Sql("SELECT login FROM users WHERE id = :?val")
//     void update(@Bind("?val") UserId id);
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonFinalMapperBeanSql.java
// public interface NonFinalMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonFinalMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonPublicMapperBeanSql.java
// public interface NonPublicMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonPublicMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/NonStaticMapperBeanSql.java
// public interface NonStaticMapperBeanSql {
// 
//     @Sql("SELECT 1")
//     NonStaticMapperBean select();
// 
// }
// 
// Path: src/test/java/com/github/mjdbc/test/asset/sql/error/UnboundParameterSql.java
// public interface UnboundParameterSql {
// 
//     @Sql("SELECT 1")
//     void update(@Bind("p") Class c);
// }


// Path: src/test/java/com/github/mjdbc/test/DbAttachSqlTest.java
import com.github.mjdbc.DbImpl;
import com.github.mjdbc.test.asset.model.BeanWithStaticFieldMapper;
import com.github.mjdbc.test.asset.model.ValidBean;
import com.github.mjdbc.test.asset.model.error.MultipleMappersBean;
import com.github.mjdbc.test.asset.sql.BeanWithStaticFieldMapperSql;
import com.github.mjdbc.test.asset.sql.EmptyQuerySql;
import com.github.mjdbc.test.asset.sql.EmptySql;
import com.github.mjdbc.test.asset.sql.ValidBeansSql;
import com.github.mjdbc.test.asset.sql.error.BeanWithNullMapperSql;
import com.github.mjdbc.test.asset.sql.error.DuplicateParametersSql;
import com.github.mjdbc.test.asset.sql.error.FakeGettersBeanSql;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql1;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql2;
import com.github.mjdbc.test.asset.sql.error.IllegalParametersSql3;
import com.github.mjdbc.test.asset.sql.error.MissedParameterSql;
import com.github.mjdbc.test.asset.sql.error.MultipleMappersBean1Sql;
import com.github.mjdbc.test.asset.sql.error.NonFinalMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.NonPublicMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.NonStaticMapperBeanSql;
import com.github.mjdbc.test.asset.sql.error.UnboundBeanParameterSql;
import com.github.mjdbc.test.asset.sql.error.UnboundParameterSql;
import com.github.mjdbc.test.asset.sql.error.WildcardParametrizedReturnTypeSql;
import org.junit.Test;

            db.attachSql(IllegalParametersSql1.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
        try {
            db.attachSql(IllegalParametersSql2.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
        try {
            db.attachSql(IllegalParametersSql3.class);
            fail();
        } catch (IllegalArgumentException ignored) {
        }
    }

    /**
     * Check that @Mapper annotation is supported
     */
    @Test
    public void checkMapperAnnotation() {
        ValidBean bean = db.attachSql(ValidBeansSql.class).selectABean();
        assertEquals(1, bean.value);
    }

    /**
     * Check that multiple mapper variants triggers error
     */
    @Test(expected = IllegalArgumentException.class)
    public void multipleMappersThrowsException1() {
        db.attachSql(MultipleMappersBean1Sql.class);