@Test
public void testUpdateCodeSystem() throws CodeSystemNotFoundException {

	CodeSystemDto updated = mock(CodeSystemDto.class);
	when(updated.getId()).thenReturn((long) 1);
	when(updated.getCode()).thenReturn("code");
	when(updated.getName()).thenReturn("name");
	when(updated.getUserName()).thenReturn("username");
	CodeSystem codeSystem = mock(CodeSystem.class);
	when(codeSystemRepository.findOne(anyLong())).thenReturn(codeSystem);
	CodeSystemDto codeSystemDto = mock(CodeSystemDto.class);
	when(valueSetMgmtHelper.createCodeSystemDtoFromEntity(codeSystem))
			.thenReturn(codeSystemDto);
	assertEquals(vst.update(updated), codeSystemDto);
}