package Ġcom . github . ker ub istan . ker ub . planner . steps . storage . l vm . duplicate Ċ Ċ import Ġcom . github . ker ub istan . ker ub . data . dynamic . Virtual Storage Device Dynamic Dao Ċ import Ġcom . github . ker ub istan . ker ub . host . Host Command Executor Ċ import Ġcom . github . ker ub istan . ker ub . model . dynamic . Virtual Storage L vm Allocation Ċ import Ġcom . github . ker ub istan . ker ub . test Disk Ċ import Ġcom . github . ker ub istan . ker ub . test Host Ċ import Ġcom . github . ker ub istan . ker ub . test L vm Capability Ċ import Ġcom . github . ker ub istan . ker ub . test Other Host Ċ import Ġcom . n ha ar man . mockito _ kotlin . any Ċ import Ġcom . n ha ar man . mockito _ kotlin . eq Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġorg . junit . Test Ċ Ċ class ĠDuplicate To L vm Executor Test Ġ{ ĊĊ ĉ @ Test Ċ ĉ fun Ġexecute () Ġ{ Ċĉ ĉ val Ġhost Command Executor Ġ= Ġmock < Host Command Executor >() ĊĊĉ ĉ val Ġvirtual Storage Dynamic Dao Ġ= Ġmock < Virtual Storage Device Dynamic Dao >() ĊĊĉ ĉ Duplicate To L vm Executor ( host Command Executor , Ġvirtual Storage Dynamic Dao ). execute ( Ċĉĉĉ ĉ Duplicate To L vm ( Ċĉĉĉĉĉ ĉ source Host Ġ= Ġtest Host , Ċĉĉĉĉĉ ĉ source Ġ= ĠVirtual Storage L vm Allocation ( Ċĉĉĉĉĉĉ ĉ vg Name Ġ= Ġ" source - vg ", Ċĉĉĉĉĉĉĉ ĉ actual Size Ġ= Ġtest Disk . size , Ċĉĉĉĉĉĉĉ ĉ path Ġ= Ġ"/ dev / source - vg /${ test Disk . id }", Ċĉĉĉĉĉĉĉ ĉ host Id Ġ= Ġtest Host . id , Ċĉĉĉĉĉĉĉ ĉ capability Id Ġ= Ġtest L vm Capability . id Ċĉĉĉĉĉ ĉ ), Ċĉĉĉĉĉ ĉ target Host Ġ= Ġtest Other Host , Ċĉĉĉĉĉ ĉ target Ġ= ĠVirtual Storage L vm Allocation ( Ċĉĉĉĉĉĉĉ ĉ vg Name Ġ= Ġ" target - vg ", Ċĉĉĉĉĉĉĉ ĉ actual Size Ġ= Ġtest Disk . size , Ċĉĉĉĉĉĉĉ ĉ path Ġ= Ġ"/ dev / target - vg /${ test Disk . id }", Ċĉĉĉĉĉĉĉ ĉ host Id Ġ= Ġtest Host . id , Ċĉĉĉĉĉĉĉ ĉ capability Id Ġ= Ġtest L vm Capability . id Ċĉĉĉĉĉ ĉ ), Ċĉĉĉĉĉ ĉ virtual Storage Device Ġ= Ġtest Disk Ċĉĉĉ ĉ ) Ċĉ ĉ ) ĊĊĉ ĉ verify ( virtual Storage Dynamic Dao ). update ( Ċĉĉĉ ĉ id Ġ= Ġeq ( test Disk . id ), Ċĉĉĉ ĉ retrieve Ġ= Ġany (), Ċĉĉĉ ĉ change Ġ= Ġany () Ċĉ ĉ ) Ċ ĉ } Ċ }