refactor tests - remove duplicate code and change StorageHandler public interface