28. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/8/2017 1:33:40 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

28.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\test\java\gov\va\med\fee\service\impl ClaimDetailsServiceImplTest.java Fri Dec 8 17:51:34 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\test\java\gov\va\med\fee\service\impl ClaimDetailsServiceImplTest.java Fri Dec 8 18:30:16 2017 UTC

28.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 244
Changed 1 2
Inserted 0 0
Removed 0 0

28.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

28.4 Active regular expressions

No regular expressions were active.

28.5 Comparison detail

  1   package go v.va.med.f ee.service .impl;
  2  
  3   import sta tic org.ju nit.Assert .assertEqu als;
  4   import sta tic org.ju nit.Assert .assertNot Null;
  5  
  6   import jav a.util.Arr ayList;
  7   import jav a.util.Lin kedList;
  8   import jav a.util.Lis t;
  9  
  10   import org .junit.Tes t;
  11   import org .junit.run ner.RunWit h;
  12   import org .mockito.I njectMocks ;
  13   import org .mockito.M ock;
  14   import org .mockito.M ockito;
  15   import org .mockito.r unners.Moc kitoJUnitR unner;
  16  
  17   import gov .va.med.fe e.exceptio ns.Generic Exception;
  18   import gov .va.med.fe e.model.re sponse.Cla imDetailsR esponse;
  19   import gov .va.med.fe e.model.re sponse.Cla imRejectio nHistoryRe sponse;
  20   import gov .va.med.fe e.model.re sponse.Dia gnosisCode s;
  21   import gov .va.med.fe e.model.re sponse.Lin eItemRespo nse;
  22   import gov .va.med.fe e.model.re sponse.Ohi InfoRespon se;
  23   import gov .va.med.fe e.model.re sponse.ReR outingHist ory;
  24   import gov .va.med.fe e.service. IAdditiona lInfoServi ce;
  25   import gov .va.med.fe e.service. IBillingPr oviderServ ice;
  26   import gov .va.med.fe e.service. IDiagnosis CodeServic e;
  27   import gov .va.med.fe e.service. ILineItems Service;
  28   import gov .va.med.fe e.service. IOhiServic e;
  29   import gov .va.med.fe e.service. IProviderI nfoService ;
  30   import gov .va.med.fe e.service. IReRouting HistorySer vice;
  31   import gov .va.med.fe e.service. IRejection HistorySer vice;
  32   import gov .va.med.fe e.service. IVeteranIn foService;
  33  
  34   /**
  35    * 
  36    * @author   DN S      SUNH
  37    * @versio n 1.0 This  Class Tes t the Clai m Service.
  38    *
  39    */
  40   @RunWith(M ockitoJUni tRunner.cl ass)
  41   public cla ss ClaimDe tailsServi ceImplTest  extends A bstractCla imServiceI mplTest {
  42           
  43           @I njectMocks
  44           Cl aimDetails ServiceImp l claimSer vice;
  45           @M ock
  46           IV eteranInfo Service ve teranInfoS ervice;
  47           @M ock
  48           IP roviderInf oService p roviderInf oService;
  49           @M ock
  50           IB illingProv iderServic e billingP roviderSer vice;
  51           @M ock
  52           ID iagnosisCo deService  diagnosisC odeService ;
  53           @M ock
  54           IA dditionalI nfoService  additiona lInfoServi ce;
  55           @M ock
  56           IR eRoutingHi storyServi ce reRouti ngHistoryS ervice;
  57           @M ock
  58           IL ineItemsSe rvice line ItemsServi ce;
  59           @M ock
  60           IR ejectionHi storyServi ce iReject ionHistory Service;
  61           @M ock
  62           IO hiService  iOhiInfoSe rvice;
  63                    
  64           @T est
  65           pu blic void  testMockIs Working()  {
  66                    asse rtNotNull( "Claim Ser vice Injec tion Faile d",claimSe rvice);
  67                    asse rtNotNull( "IClaimRep ository In jection Fa iled",iCla imReposito ryMock);
  68           }
  69           
  70           @T est
  71           pu blic void  testGetCla imByIndex_ success()  throws Gen ericExcept ion {
  72                    // S tub
  73                    Mock ito.when(i ClaimRepos itoryMock. findByClai mIndex(999 L)).thenRe turn(claim );
  74                    Clai mDetailsRe sponse cla imResponse  = new Cla imDetailsR esponse(cl aim.getCla imIndex(),  "2.0.1.ST D", "INPRO CESS", "11 1111", nul l, null, n ull, null,  
  75                                      null, ne w LinkedLi st<Diagnos isCodes>() , new Arra yList<Line ItemRespon se>(), new  ArrayList <ReRouting History>() , new Arra yList<Clai mRejection HistoryRes ponse>(),
  76                                      new Arra yList<OhiI nfoRespons e>());
  77                    
  78                    try  {
  79                             ClaimD etailsResp onse resul tSet = cla imService. getClaimDe tailsByCla imIndex(cl aim.getCla imIndex()) ;
  80                             System .out.print ln("claimR esponse -  " +claimRe sponse.toS tring());
  81                             System .out.print ln("result Set     -  " +resultS et.toStrin g());
  82                             assert Equals(cla imResponse .getClaimI d(), resul tSet.getCl aimId());
  83                             assert Equals(res ultSet.get PatientCon trolNumber (), "2.0.1 .STD");
  84                             assert Equals(res ultSet.get ClaimStatu s(), "INPR OCESS");
  85                             assert Equals(res ultSet.get PreAuthori zation(),  "111111");
  86                             // ass ertEquals( claimRespo nse, resul tSet);
  87  
  88                    } ca tch (Excep tion e) {
  89                             throw  e;
  90                    }
  91           }
  92  
  93           @T est 
  94           pu blic void  testGetCla imByIndex_ with_OHI_s uccess() t hrows Gene ricExcepti on {
  95                    Mock ito.when(i ClaimRepos itoryMock. findByClai mIndex(999 L)).thenRe turn(claim );
  96  
  97                    OhiI nfoRespons e ohiInfoR esponse =  new OhiInf oResponse( );
  98                    ohiI nfoRespons e.setPayer Name("Paye r1.114");
  99                    ohiI nfoRespons e.setGroup Name("114A  Insurance  Corp");
  100                    List <OhiInfoRe sponse> oh iInfo = ne w ArrayLis t<OhiInfoR esponse>() ;
  101                    ohiI nfo.add(oh iInfoRespo nse);
  102                    
  103                    Mock ito.when(i OhiInfoSer vice.getOh iInfo(clai m)).thenRe turn(ohiIn fo);
  104                    
  105                    try  {
  106                             ClaimD etailsResp onse resul tSet = cla imService. getClaimDe tailsByCla imIndex(cl aim.getCla imIndex()) ;
  107                             assert Equals(res ultSet.get OhiInfo(). get(0).get PayerName( ), "Payer1 .114");
  108                             assert Equals(res ultSet.get OhiInfo(). get(0).get GroupName( ), "114A I nsurance C orp");
  109  
  110                    } ca tch (Excep tion e) {
  111                             throw  e;
  112                    }
  113           }
  114  
  115           @S uppressWar nings("unc hecked")
  116           @T est(expect ed = Gener icExceptio n.class)
  117           pu blic void  test_GetCl aimDetails ByIndex_fa il_raise_e rror() thr ows Generi cException  {
  118                    
  119                    // S tub the Re pository
  120                    Mock ito.when(c laimServic e.getClaim DetailsByC laimIndex( Long.value Of(999))). thenThrow( GenericExc eption.cla ss);
  121                    
  122           }
  123   }