I agree. What guided me here was that I didn't want this test class to rely on tests in HttpResponseCacheTest for coverage. I was treating the java.net.ResponseCache behavior as its own thing. Knowing the code, clearly okhttp decides what to be cached then calls the OkResponseCache as needed, which delegates through to the ResponseCache.

How about I put a comment in the class JavaDoc explaining that some coverage of _what_ should be cached is found in HttpResponseCacheTest? I'll then remove these tests:

responseCachingByResponseCode
originServerSends407
responseCaching_410

In earlier versions of  the code I had completely broken caching for HTTPS (by not handling SecureResponseCache) so I'd like to keep secureResponseCaching. testResponseCaching-based tests also seem quite fundamental.

Please let me know which other ones you'd like removed: I tried to reason about it but it mostly comes down to a balance between coverage and duplication and I'd like guidance.