Source:
<code>public static void main(String[] args) { ICommandService commands = new CommandServiceImpl(); commands.authorCreated("eEvans", "Eric Evans", "eEvans@email.com"); commands.authorCreated("jBloch", "Joshua Bloch", "jBloch@email.com"); commands.authorCreated("mFowler", "Martin Fowler", "mFowler@email.com"); commands.bookAddedToAuthor("Domain-Driven Design", 60.08, "eEvans"); commands.bookAddedToAuthor("Effective Java", 40.54, "jBloch"); commands.bookAddedToAuthor("Java Puzzlers", 39.99, "jBloch"); commands.bookAddedToAuthor("Java Concurrency in Practice", 29.40, "jBloch"); commands.bookAddedToAuthor("Patterns of Enterprise Application Architecture", 54.01, "mFowler"); commands.bookAddedToAuthor("Domain Specific Languages", 48.89, "mFowler"); commands.authorNameUpdated("eEvans", "Eric J. Evans"); IQueryService queries = new QueryServiceImpl(); Author nullAuthor = queries.getAuthorByUsername("username"); Author eEvans = queries.getAuthorByUsername("eEvans"); BigInteger jBlochBooksCount = queries.getAuthorBooksCount("jBloch"); BigInteger authorsCount = queries.getAuthorsCount(); Book dddBook = queries.getBook("Domain-Driven Design"); List<Book> jBlochBooks = queries.getAuthorBooks("jBloch"); System.out.println("Author username : " + nullAuthor); System.out.println("Author eEvans : " + eEvans); System.out.println("jBloch number of books : " + jBlochBooksCount); System.out.println("Number of authors : " + authorsCount); System.out.println("DDD book : " + dddBook); <START> System.out.println("jBloch books : " + jBlochBooks); <END> HibernateUtil.getSessionFactory().close(); }</code><technical_language>Instead of System.out.println a logging framework. Check other patterns for examples</technical_language>

Target:
public static void main(String[] args) { ICommandService commands = new CommandServiceImpl(); commands.authorCreated("eEvans", "Eric Evans", "eEvans@email.com"); commands.authorCreated("jBloch", "Joshua Bloch", "jBloch@email.com"); commands.authorCreated("mFowler", "Martin Fowler", "mFowler@email.com"); commands.bookAddedToAuthor("Domain-Driven Design", 60.08, "eEvans"); commands.bookAddedToAuthor("Effective Java", 40.54, "jBloch"); commands.bookAddedToAuthor("Java Puzzlers", 39.99, "jBloch"); commands.bookAddedToAuthor("Java Concurrency in Practice", 29.40, "jBloch"); commands.bookAddedToAuthor("Patterns of Enterprise Application Architecture", 54.01, "mFowler"); commands.bookAddedToAuthor("Domain Specific Languages", 48.89, "mFowler"); commands.authorNameUpdated("eEvans", "Eric J. Evans"); IQueryService queries = new QueryServiceImpl(); Author nullAuthor = queries.getAuthorByUsername("username"); Author eEvans = queries.getAuthorByUsername("eEvans"); BigInteger jBlochBooksCount = queries.getAuthorBooksCount("jBloch"); BigInteger authorsCount = queries.getAuthorsCount(); Book dddBook = queries.getBook("Domain-Driven Design"); List<Book> jBlochBooks = queries.getAuthorBooks("jBloch"); LOGGER.info("Author username : {}", nullAuthor); LOGGER.info("Author eEvans : {}", eEvans); LOGGER.info("jBloch number of books : {}", jBlochBooksCount); LOGGER.info("Number of authors : {}", authorsCount); LOGGER.info("DDD book : {}", dddBook); LOGGER.info("jBloch books : {}", jBlochBooks); HibernateUtil.getSessionFactory().close(); }