add test and documentation for setStorageType function