Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
package gov.va.med.ewv.service.impl;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
import java.math.BigDecimal;
import java.util.Date;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import gov.va.med.ars.dao.ewv.IEwvPdfReferenceRepository;
import gov.va.med.ars.exceptions.GenericException;
import gov.va.med.domain.ewv.EwvReferences;
@RunWith(MockitoJUnitRunner.class)
public class EwvFileOperationsServiceImplTest {
@InjectMocks
EwvPdfReferenceServiceImpl ewvPdfReferenceService;
@Mock
IEwvPdfReferenceRepository claimAttachmentRepository;
@Test
public void testGetfileContentAndLog_success() throws GenericException {
EwvReferences ewvReferences = new EwvReferences(new BigDecimal("1852"), "test",
"/u02/attachments/output//86753303.1/yalesample.tiff", "ewvUser",
new Date(), null, new Date(), "true");
when(claimAttachmentRepository.findByGuid(ewvReferences.getGuid())).thenReturn(ewvReferences);
String attachmentPath = ewvPdfReferenceService.getPathForTheAttachment("1852");
assertTrue(attachmentPath.equalsIgnoreCase("/u02/attachments/output//86753303.1/yalesample.tiff"));
}
}