added onTest method