change test method and pom directory
append null check for output directory.
added test using database.