On the other hand, Nilay Patel argues that it doesn’t matter whether the files in question were just tests, or even whether they shipped in actual Android handsets:
From a legal perspective, there’s no question that these files
create increased copyright liability for Google, because the state
of our current copyright law doesn’t make exceptions for how
source code trees work, or whether or not a script pasted in a
different license, or whether these files made it into handsets.
The single most relevant legal question is whether or not copying
and distributing these files was authorized by Oracle, and the
answer clearly appears to be “nope”. […]
Why does this matter? Because we’re hearing that Oracle is
dead-set on winning this case and eventually extracting a
per-handset royalty on every Android handset shipped.