How do you write a unit test for a function that is not exported?
Check out the documentation on modules to better understand how namespacing works. There is no forced visibility in Julia, so you can always access functions, exported or non-exported, in any module by fully qualifying the reference.
So in your case, if your module is named HTTP
, you could say HTTP.validate_http_response
to access your unexported function to test.