Exclude junit-dep as it is deprecated and use the latest version of JUnit instead (4.11). The 4.11 version permits @Rule declarations to be functions (sometimes needed).

This is a fix for the 2.1.x branch with respect to issue #1478