improve testcases
Changed awaitTermination not to call awaitTermincation in Scala. Just use time.sleep instread