Testing onClick Component method