Used Local varibles to avoid NPE All tests are passing now