refactor tests with more concise assertion checks
minor formatting