getConnectionConfig, more tests, some refactor