@Test
public void testCreateDataSource() {

	// GIVEN
	when(descriptor.getProperties()).thenReturn(ImmutableMap.<String, Object>builder()
		.put("javax.persistence.jdbc.driver", "some.Driver")
		.put("javax.persistence.jdbc.url", "some://url")
		.put("javax.persistence.jdbc.user", "someUser")
		.put("javax.persistence.jdbc.password", "somePassword")
		.build());
	SqlDbConfiguration config = new SqlDbConfiguration(descriptor);
	
	
	// WHEN
	BasicDataSource dataSource = (BasicDataSource) config.createDataSource();
	
	// THEN
	assertNotNull(dataSource);
	assertThat(dataSource.getDriverClassName(),equalTo("some.Driver"));
	assertThat(dataSource.getUrl(),equalTo("some://url"));
	assertThat(dataSource.getUsername(),equalTo("someUser"));
	assertThat(dataSource.getPassword(),equalTo("somePassword"));
	assertThat(dataSource.getMinIdle(),equalTo(1));
	assertThat(dataSource.getMaxIdle(),equalTo(2));
}