testCompile with .aar files

Is testCompile supposed to work with published aar files?

I have dependencies: compile url_to_published_aar_file testCompile url_to_published_aar_file

Compilation works, but when the test is run, I get a java.lang.ClassNotFoundException