### Question:
TweeterApplicationRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) throws Exception { this.jdbcTemplate.update( "INSERT INTO tweets(uuid, text, username, created_at) VALUES(?,?,?,?)", UUID.randomUUID(), "Demo1", "making", Instant.now()); this.jdbcTemplate.update( "INSERT INTO tweets(uuid, text, username, created_at) VALUES(?,?,?,?)", UUID.randomUUID(), "Demo2", "making", Instant.now()); Long count = this.jdbcTemplate.queryForObject("SELECT count(*) FROM tweets", Long.class); System.out.println("Number of tweets: " + count); List<Tweet> tweets = this.jdbcTemplate.query( "SELECT uuid, text, username, created_at FROM tweets", (rs, i) -> new Tweet(UUID.fromString(rs.getString("uuid")), rs.getString("text"), rs.getString("username"), rs.getTimestamp("created_at").toInstant())); tweets.forEach(tweet -> System.out.println(tweet)); } TweeterApplicationRunner(JdbcTemplate jdbcTemplate); @Override void run(ApplicationArguments args);  }### Answer:
@Test void contextLoads(CapturedOutput capture) { SpringApplication.run(Hajiboot2TweeterApplication.class); String output = capture.toString(); assertThat(output).contains("Number of tweets: 2"); assertThat(output).containsPattern( "Tweet\\{uuid=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}, text='Demo1', username='making', createdAt=[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]+Z}"); assertThat(output).containsPattern( "Tweet\\{uuid=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}, text='Demo2', username='making', createdAt=[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]+Z}"); }