### Question:
JpaCategoryRepository implements CategoryRepository { @Override public int removeFromCreatedOrModifiedFields(String userId) { List<Category> categories = getAll(); int numRecordsChanged = 0; for (Category category : categories) { boolean changed = false; String createdUser = category.getCreatedUserId(); String lastModifiedUser = category.getLastModifiedUserId(); if (createdUser != null && userId.equals(createdUser)) { category.setCreatedUserId(null); changed = true; } if (lastModifiedUser != null && userId.equals(lastModifiedUser)) { category.setLastModifiedUserId(null); changed = true; } if (changed) { numRecordsChanged++; save(category); } } return numRecordsChanged; }  @Override Class<? extends Category> getType(); @Override Category get(String id); @Override Category save(Category item); @Override void delete(Category item); @Override List<Category> getAll(); @Override List<Category> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override int removeFromCreatedOrModifiedFields(String userId);  }### Answer:
@Test @Transactional(readOnly=false) @Rollback(true) public void removeFromCreatedOrModifiedFields() { assertThat(repository.removeFromCreatedOrModifiedFields(VALID_USER_ID.toString()), is(5)); }