Replaced static test classes with mocks (#4267)
Replaced static test classes with mocks (#4267)

* replaced static test classes with mocks

* added CALLS_REAL_METHODS as defaultAnswer

* Update core/src/test/java/hudson/slaves/NodeListTest.java

Co-Authored-By: Tim Jacomb <c432276a71db6630349cd5fca0e51b56f41e6623@kainos.com>

* Update core/src/test/java/hudson/slaves/NodeListTest.java

Co-Authored-By: Adrien Lecharpentier <e0d24ed0e57afa0b4554566c21fa74f7dde5ca6a@gmail.com>

ikedam/jenkins,viqueen/jenkins,viqueen/jenkins,Vlatombe/jenkins,pjanouse/jenkins,MarkEWaite/jenkins,DanielWeber/jenkins,MarkEWaite/jenkins,viqueen/jenkins,pjanouse/jenkins,jenkinsci/jenkins,damianszczepanik/jenkins,DanielWeber/jenkins,pjanouse/jenkins,v1v/jenkins,rsandell/jenkins,rsandell/jenkins,oleg-nenashev/jenkins,damianszczepanik/jenkins,recena/jenkins,v1v/jenkins,stephenc/jenkins,jenkinsci/jenkins,DanielWeber/jenkins,v1v/jenkins,jenkinsci/jenkins,godfath3r/jenkins,jenkinsci/jenkins,oleg-nenashev/jenkins,recena/jenkins,Vlatombe/jenkins,patbos/jenkins,v1v/jenkins,jenkinsci/jenkins,godfath3r/jenkins,oleg-nenashev/jenkins,jenkinsci/jenkins,patbos/jenkins,MarkEWaite/jenkins,recena/jenkins,daniel-beck/jenkins,pjanouse/jenkins,pjanouse/jenkins,MarkEWaite/jenkins,patbos/jenkins,DanielWeber/jenkins,godfath3r/jenkins,stephenc/jenkins,daniel-beck/jenkins,daniel-beck/jenkins,ikedam/jenkins,MarkEWaite/jenkins,patbos/jenkins,v1v/jenkins,Vlatombe/jenkins,damianszczepanik/jenkins,recena/jenkins,damianszczepanik/jenkins,daniel-beck/jenkins,stephenc/jenkins,ikedam/jenkins,v1v/jenkins,Vlatombe/jenkins,rsandell/jenkins,rsandell/jenkins,viqueen/jenkins,stephenc/jenkins,MarkEWaite/jenkins,damianszczepanik/jenkins,damianszczepanik/jenkins,godfath3r/jenkins,ikedam/jenkins,rsandell/jenkins,oleg-nenashev/jenkins,DanielWeber/jenkins,daniel-beck/jenkins,patbos/jenkins,MarkEWaite/jenkins,recena/jenkins,stephenc/jenkins,daniel-beck/jenkins,damianszczepanik/jenkins,viqueen/jenkins,godfath3r/jenkins,patbos/jenkins,Vlatombe/jenkins,ikedam/jenkins,jenkinsci/jenkins,jenkinsci/jenkins,viqueen/jenkins,Vlatombe/jenkins,pjanouse/jenkins,DanielWeber/jenkins,oleg-nenashev/jenkins,rsandell/jenkins,pjanouse/jenkins,patbos/jenkins,ikedam/jenkins,Vlatombe/jenkins,rsandell/jenkins,recena/jenkins,stephenc/jenkins,daniel-beck/jenkins,godfath3r/jenkins,godfath3r/jenkins,daniel-beck/jenkins,ikedam/jenkins,v1v/jenkins,stephenc/jenkins,damianszczepanik/jenkins,rsandell/jenkins,oleg-nenashev/jenkins,DanielWeber/jenkins,recena/jenkins,viqueen/jenkins,MarkEWaite/jenkins,ikedam/jenkins,oleg-nenashev/jenkins