@Test
public void shouldExecuteBoundSelectOneBlogStatementWithConstructorUsingXMLConfig() {
SqlSession session = sqlSessionFactory.openSession();
try {
BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
Blog blog = mapper.selectBlogByIdUsingConstructor(1);
assertEquals(1, blog.getId());
assertEquals("Jim Business", blog.getTitle());
assertNotNull("author should not be null", blog.getAuthor());
List<Post> posts = blog.getPosts();
assertTrue("posts should not be empty", posts != null && !posts.isEmpty());
} finally {
session.close();
}
}