Added sql tests and made test more configurable.