@Test public void setDataSource() { service.setSmartDataSource(mock(SmartDataSource.class)); assertThat(service.jdbcTemplate, not(template)); }