@Test
public void shouldLookupDataSourceByName() throws Exception {

    final String jndiName = "jndiName";
    final DataSource dataSource = mock(DataSource.class);
    when(initialContext.lookup(jndiName)).thenReturn(dataSource);
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName), is(dataSource));
}