Update certificates in tests

Test was failing due to expired sample certificate. Also renamed a field to clarify its purpose and chained an exception.