Most likely you have code written in Java 7 and a tests written in Java 6. This is not a problem provided you have a JVM which can run Java 7 i.e. JRE 7+.
The fact some of the code is written in Java 1.1 or 5.0 or 6, or even compiled using this version doesn't matter.