Fix deprecation warnings on junit.framework.Assert

Use org.junit.Assert instead everywhere. Also fix some other minor warnings
KT-5697 Duplicate Unit type
 #KT-5697 Fixed
fix wrong unreachable code detected for while(break){}