@Test
public void testUpdateValueSetCategory()
		throws ValueSetCategoryNotFoundException {

	ValueSetCategoryDto updated = mock(ValueSetCategoryDto.class);
	when(updated.getId()).thenReturn((long) 1);
	when(updated.getCode()).thenReturn("code");
	when(updated.getName()).thenReturn("name");
	when(updated.getUserName()).thenReturn("username");
	ValueSetCategory valueSetCategory = mock(ValueSetCategory.class);
	when(valueSetCategoryRepository.findOne(anyLong())).thenReturn(
			valueSetCategory);
	when(
			consentRepositoryMock
					.findAllByDoNotShareSensitivityPolicyCodesValueSetCategory(valueSetCategory))
			.thenReturn(null);
	ValueSetCategoryDto valueSetCategoryDto = mock(ValueSetCategoryDto.class);
	when(
			valueSetMgmtHelper.createValuesetCategoryDtoFromEntity(
					valueSetCategory, consentRepositoryMock)).thenReturn(
			valueSetCategoryDto);
	assertEquals(vst.update(updated), valueSetCategoryDto);
}