/** Test correct method on mapper is called. */ @Test public void testRemovePersistentLogin() { final PersistentLoginMapper loginMapper = context.mock(PersistentLoginMapper.class); context.checking( new Expectations() { { oneOf(loginMapper).deletePersistentLogin(with("theuser")); } }); PersistentLoginRepositoryImpl sut = new PersistentLoginRepositoryImpl(loginMapper); sut.removePersistentLogin("theuser"); context.assertIsSatisfied(); }