refactor tests and add additional TLS tests