Implement support to JDK 1.5 compilance and update the tests