Add a test for the learn method