added new test class ApplyCommandTest