Fixed the broken test (unexpected NPE during update, fixed also the other methods as well))