package Ġcom . github . ker ub istan . ker ub . utils . j unix . file Ċ Ċ import Ġcom . github . ker ub istan . ker ub . ss ht est utils . mock Command Execution Ċ import Ġcom . n ha ar man . mockito _ kotlin . arg That Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġorg . apache . ss hd . client . session . Client Session Ċ import Ġorg . junit . Assert . assertTrue Ċ import Ġorg . junit . Test Ċ Ċ class ĠR m Test Ġ{ ĊĊ ĉ @ Test Ċ ĉ fun Ġavailable () Ġ{ Ċĉ ĉ assertTrue (" rm Ġshould Ġbe Ġavailable Ġon Ġany Ġunix - like ĠOS ", ĠR m . available ( null )) Ċ ĉ } ĊĊ ĉ @ Test Ċ ĉ fun Ġremove () Ġ{ Ċĉ ĉ val Ġsession Ġ= Ġmock < Client Session >() Ċĉ ĉ session . mock Command Execution (" rm Ġ.* ". to Regex ()) Ċĉ ĉ Rm . remove ( session , Ġ"/ tmp / delete me ") Ċĉ ĉ verify ( session ). create Exec Channel ( arg That Ġ{ Ġstart sWith (" rm ") Ġ}) Ċ ĉ } Ċ }