@Test
public void testUpdateCodeSystemVersion()
		throws CodeSystemVersionNotFoundException,
		CodeSystemNotFoundException {

	CodeSystemVersionDto updatedMock = mock(CodeSystemVersionDto.class);
	when(updatedMock.getId()).thenReturn((long) 1);
	when(updatedMock.getCode()).thenReturn("code");
	when(updatedMock.getName()).thenReturn("name");
	when(updatedMock.getUserName()).thenReturn("username");
	CodeSystemVersionDto codeSystemVersionDtoMock = mock(CodeSystemVersionDto.class);
	CodeSystemVersion codeSystemVersionMock = mock(CodeSystemVersion.class);
	CodeSystem codeSystemMock = mock(CodeSystem.class);
	when(codeSystemVersionRepository.findOne(anyLong())).thenReturn(
			codeSystemVersionMock);
	when(codeSystemVersionMock.getCodeSystem()).thenReturn(codeSystemMock);
	when(codeSystemMock.getId()).thenReturn((long) 1);
	when(codeSystemRepository.findOne(anyLong()))
			.thenReturn(codeSystemMock);
	when(
			valueSetMgmtHelper
					.createCodeSystemVersionDtoFromEntity(codeSystemVersionMock))
			.thenReturn(codeSystemVersionDtoMock);
	assertEquals(vst.update(updatedMock), codeSystemVersionDtoMock);
}