switch junit test & bug fix
select case & isEmpty function