@Test
public void shouldHandleMutipleDataSources() throws Exception {

    final String jndiName_1 = "jndiName_1";
    final String jndiName_2 = "jndiName_2";
    final String jndiName_3 = "jndiName_3";
    final DataSource dataSource_1 = mock(DataSource.class);
    final DataSource dataSource_2 = mock(DataSource.class);
    final DataSource dataSource_3 = mock(DataSource.class);
    when(initialContext.lookup(jndiName_1)).thenReturn(dataSource_1);
    when(initialContext.lookup(jndiName_2)).thenReturn(dataSource_2);
    when(initialContext.lookup(jndiName_3)).thenReturn(dataSource_3);
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_1), is(dataSource_1));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_2), is(dataSource_2));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_3), is(dataSource_3));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_1), is(dataSource_1));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_2), is(dataSource_2));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_3), is(dataSource_3));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_1), is(dataSource_1));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_2), is(dataSource_2));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_3), is(dataSource_3));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_1), is(dataSource_1));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_2), is(dataSource_2));
    assertThat(defaultJdbcDataSourceProvider.getDataSource(jndiName_3), is(dataSource_3));
    verify(initialContext, times(1)).lookup(jndiName_1);
    verify(initialContext, times(1)).lookup(jndiName_2);
    verify(initialContext, times(1)).lookup(jndiName_3);
}