update hydrate and dehydate test code