Fix compilation error in junit test