Add custom exceptions and unit tests to verify exceptions are thrown when private keys required but not provided.