39404142434445
@Before public void init() { usa = mock(DefaultUserServiceAdapter.class); uc = mock(UserCurator.class); ar = new AdminResource(usa, uc); }
5152535455565758
verify(usa).createUser(any(User.class)); } @Test public void initWithNonDefaultUserService() { ar = new AdminResource(mock(UserServiceAdapter.class), uc); assertEquals("Already initialized.", ar.initialize()); }