public async Task GivenDatasetWithInvalidVrValue_WhenStoring_TheServerShouldReturnConflict() { var studyInstanceUID = TestUidGenerator.Generate(); DicomFile dicomFile1 = Samples.CreateRandomDicomFileWithInvalidVr(studyInstanceUID); DicomWebException exception = await Assert.ThrowsAsync <DicomWebException>(() => _instancesManager.StoreAsync(new[] { dicomFile1 })); Assert.Equal(HttpStatusCode.Conflict, exception.StatusCode); Assert.False(exception.ResponseDataset.TryGetSequence(DicomTag.ReferencedSOPSequence, out DicomSequence _)); ValidationHelpers.ValidateFailedSopSequence( exception.ResponseDataset, ConvertToFailedSopSequenceEntry(dicomFile1.Dataset, ValidationFailedFailureCode)); }