Create immutable test state before each test case.
TypeScript functions for type assertions and type casting