Tidied up DBStoreTest and Fixed null bug in DBStore