removed bug with null  database
junit