verify(userService, categoryService);
}
@Test
public void deleteCategory_invalidValidRequest_falseConfirmation(){
Model model = new ExtendedModelMap();
User user = new UserImpl();
String id = "1";
String categoryText = "Social";
CategoryImpl category = new CategoryImpl();
category.setCreatedUserId(user.getId());
category.setText(categoryText);
category.setId(id);
SessionStatus sessionStatus = createMock(SessionStatus.class);
expect(userService.getAuthenticatedUser()).andReturn(user).once();
replay(userService);
String view = controller.deleteCategory(category, validToken, validToken,"false",REFERRER_ID, model, sessionStatus);
assertEquals("ViewName match", ViewNames.ADMIN_CATEGORY_DETAIL, view);
assertEquals("missing confirmation", true, model.asMap().get("missingConfirm"));
verify(userService);
}