Made Database and Stub consistent,
Added Testing for Stub