fix classCastEception in test