29. 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.

29.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 DisapproveServiceImplTest.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 DisapproveServiceImplTest.java Fri Dec 8 18:58:59 2017 UTC

29.2 Comparison summary

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

29.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

29.4 Active regular expressions

No regular expressions were active.

29.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.Arr ays;
  8   import jav a.util.Cal endar;
  9   import jav a.util.Dat e;
  10   import jav a.util.Gre gorianCale ndar;
  11   import jav a.util.Lin kedList;
  12   import jav a.util.Lis t;
  13  
  14   import org .apache.lo gging.log4 j.LogManag er;
  15   import org .apache.lo gging.log4 j.Logger;
  16   import org .junit.Tes t;
  17   import org .junit.run ner.RunWit h;
  18   import org .mockito.I njectMocks ;
  19   import org .mockito.M ock;
  20   import org .mockito.M ockito;
  21   import org .mockito.r unners.Moc kitoJUnitR unner;
  22  
  23   import gov .va.med.fe e.dao.IAdj ustmentGro upReposito ry;
  24   import gov .va.med.fe e.dao.IAdj ustmentRea sonReposit ory;
  25   import gov .va.med.fe e.dao.ICal cMethodRep ository;
  26   import gov .va.med.fe e.dao.ICla imByStatus CodeReposi tory;
  27   import gov .va.med.fe e.dao.ICla imPaymentT ypeReposit ory;
  28   import gov .va.med.fe e.dao.ICla imProcStat usReposito ry;
  29   import gov .va.med.fe e.dao.ICla imProcedur eRepositor y;
  30   import gov .va.med.fe e.dao.ICla imQueueRep ository;
  31   import gov .va.med.fe e.dao.ICla imReposito ry;
  32   import gov .va.med.fe e.dao.IDis approveCla imReposito ry;
  33   import gov .va.med.fe e.dao.IRej ectedClaim Repository ;
  34   import gov .va.med.fe e.dao.IRem ittanceRem arkReposit ory;
  35   import gov .va.med.fe e.exceptio ns.Generic Exception;
  36   import gov .va.med.fe e.model.re quest.Reje ctedClaimR equest;
  37   import gov .va.med.fe e.model.re sponse.Adj ustmentRea sonRespons e;
  38   import gov .va.med.fe e.model.re sponse.Dis approveCla imsPage;
  39   import gov .va.med.fe e.model.re sponse.Dis approveCla imsReason;
  40  
  41   @RunWith(M ockitoJUni tRunner.cl ass)
  42   public cla ss Disappr oveService ImplTest e xtends Abs tractClaim ServiceImp lTest  {
  43           
  44           
  45           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Diag nosisCodeS erviceImpl Test.class );
  46           
  47           @I njectMocks
  48           Di sapproveSe rviceImpl  disapprove MockServic e;
  49           
  50           @M ock
  51           ID isapproveC laimReposi tory disap proveRepos itory;
  52           
  53           @M ock
  54           IC laimReposi tory iClai mRepositor yMock;
  55           
  56           @M ock
  57           ID isapproveC laimReposi tory iDisC laimReposi tory;
  58  
  59           @M ock
  60           IC laimReposi tory claim Repository ;
  61           
  62           @M ock
  63           IC laimByStat usCodeRepo sitory cla imByStatus CodeReposi tory;
  64  
  65           @M ock
  66           IR ejectedCla imReposito ry rejecte dClaimRepo sitory;
  67           
  68           @M ock
  69           IC laimQueueR epository  claimQueue Repository ;
  70           
  71           @M ock
  72           IC laimPaymen tTypeRepos itory clai mPaymentTy peReposito ry;
  73           
  74           @M ock
  75           IC alcMethodR epository  calcMethod Repository ;
  76           
  77           @M ock
  78           IC laimProced ureReposit ory claimP rocedureRe pository;
  79           
  80           @M ock
  81           IC laimProcSt atusReposi tory claim ProcStatus Repository ;
  82           
  83           @M ock
  84           IA djustmentG roupReposi tory adjus tmentGroup Repository ;
  85           
  86           @M ock
  87           IA djustmentR easonRepos itory adju stmentReas onReposito ry;
  88           
  89           @M ock
  90           IR emittanceR emarkRepos itory remi ttanceRema rkReposito ry;
  91           
  92           @T est
  93           pu blic void  Test_popul ateAdjustm entReasons Success()  {
  94                    List <Disapprov eClaimsRea son> mockR easonCodes  = new Lin kedList<Di sapproveCl aimsReason >();
  95                    
  96                    fina l Date dat eCreated =  new Grego rianCalend ar(1990, C alendar.AP RIL, 30).g etTime();
  97                    
  98                    Disa pproveClai msPage rea sonCodesfr mServiceCa ll = new D isapproveC laimsPage( );
  99                    
  100                    List <Adjustmen tReasonRes ponse> adj ustmentRea sonRespons e = new Li nkedList<A djustmentR easonRespo nse>();
  101                    Adju stmentReas onResponse  adjustmen tReasonRes ponse2 = n ew Adjustm entReasonR esponse("1 23", "Test 123", 'Y',  "", dateC reated, 'Y ');
  102                    adju stmentReas onResponse .add(adjus tmentReaso nResponse2 );
  103                    
  104                    Disa pproveClai msReason d isapproveC laimsReaso nMock = ne w Disappro veClaimsRe ason("123" , "Test123 ");
  105                    mock ReasonCode s.add(disa pproveClai msReasonMo ck);
  106                    
  107                    Mock ito.when(d isapproveR epository. populateAd justmentRe asons()).t henReturn( adjustment ReasonResp onse);
  108                    
  109                    //Li st<String>  reasonCod esfrmServi ceCall = n ew LinkedL ist<String >();
  110                    try  {                    
  111                             reason CodesfrmSe rviceCall  = disappro veMockServ ice.popula teAdjustme ntReasons( );
  112                             for(in t i = 0; i <reasonCod esfrmServi ceCall.get Disapprove ClaimsReas ons().size (); i++){
  113                                      assertEq uals(mockR easonCodes .get(i).ge tClaimReas ons(), rea sonCodesfr mServiceCa ll.getDisa pproveClai msReasons( ).get(i).g etClaimRea sons());
  114                             }
  115                             assert NotNull(Ar rays.asLis t(reasonCo desfrmServ iceCall).c ontainsAll (adjustmen tReasonRes ponse));
  116                             logger .info("Tes t case pas sed with n o exceptio ns");
  117                             
  118                    } ca tch (Excep tion e) {                   
  119                             e.prin tStackTrac e();
  120                    }
  121           }
  122           
  123           
  124           // Needs to b e develope d
  125   /*      
  126           @T est
  127           pu blic void  Test_popul ateDisappr oveClaimsS uccess() {
  128                    
  129                    Prov iderType p roviderTyp e = new Pr oviderType ("BILLING  PROVIDER",  providerC reatedDate , "VA");
  130                    Clai mProcedure  claimProc edure = ne w ClaimPro cedure(Lon g.valueOf( 1000), cla im, servic eType, Lon g.valueOf( 1000),
  131                                      Long.val ueOf(1000) , "Test",  "N", "VA U SA", dateC reated);
  132                    Prov iderInfo p roviderInf o = new Pr oviderInfo (Long.valu eOf(1000),  claim, cl aimProcedu re, provid erType,
  133                                      "VA USA" , "VA USA" , "VA USA" , "Doe", " John", "jo hnny", "jr .", "Sarno  Plaza", " Sarno Road ", "Melbou rne",
  134                                       "Florida",  "32935",  "John Doe" , "9999999 999", "912 345678", " john.doe@ DOMAIN ", Long.va lueOf(1000 ), dateCre ated, "VA  USA");
  135                    
  136                    Mock ito.when(i ClaimRepos itoryMock. findClaimS tatusByCla imIndex(cl aim.getCla imIndex()) ).thenRetu rn(claim);
  137                    
  138                    
  139                    
  140           }* /
  141           
  142           /* @Test
  143           pu blic void  test_getCl aimsToDisa pprove() t hrows Gene ricExcepti on {
  144  
  145                    Disa pproveClai msPage dis approveCla imsPage =  new Disapp roveClaims Page();
  146                    
  147                    Clai msToDisapp rove claim sToDisappr ove = new  ClaimsToDi sapprove() ;
  148                    clai msToDisapp rove.setVe teranName( "DOMINIQUE  RODGERS-C ROMARTIE") ;
  149                    
  150                    List <ClaimsToD isapprove>  claimsToD isapproveL ist = new  ArrayList< ClaimsToDi sapprove>( );
  151                    clai msToDisapp roveList.a dd(claimsT oDisapprov e);
  152                    disa pproveClai msPage.set ClaimsToDi sapprove(c laimsToDis approveLis t);
  153                    
  154                    Clai m claimToP ass = new  Claim();
  155                    clai mToPass.se tClaimStat usCd("ESTA BLISH");
  156                    
  157                    Prov iderInfo p roviderInf o = new Pr oviderInfo ();
  158                    
  159                    Prov iderType p roviderTyp e = new Pr oviderType ();
  160                    prov iderType.s etProvider TypeCd("BI LLING PROV IDER");
  161                    
  162                    
  163                    prov iderInfo.s etProvider Type(provi derType);
  164                    
  165                    prov iderInfo.s etLastName ("GENERAL  MEMORIAL H OSPITAL");
  166                    
  167                    Set< ProviderIn fo> provid erInfoSet  = new Hash Set<Provid erInfo>();
  168                    clai mToPass.se tProviderI nfos(provi derInfoSet );
  169                    
  170                    Pers onInfo per sonInfo =  new Person Info();
  171                    pers onInfo.set FirstName( "DOMINIQUE ");
  172                    pers onInfo.set LastName(" RODGERS-CR OMARTIE");
  173                    
  174                    Pers onType per sonType =  new Person Type();
  175                    pers onType.set PersonType Cd("PATIEN T");
  176                    pers onInfo.set PersonType (personTyp e);
  177                    
  178                    Set< PersonInfo > personIn fos = new  HashSet<Pe rsonInfo>( );
  179                    pers onInfos.ad d(personIn fo);
  180                    clai mToPass.se tPersonInf os(personI nfos);
  181                    
  182                    BigD ecimal cou nt = new B igDecimal( 1);
  183  
  184                    List <Long> cla imIds = ne w ArrayLis t<Long>();
  185                    clai mIds.add(9 99999L);
  186                    
  187                    Mock ito.when(d isapproveR epository. getCount(9 99999L)).t henReturn( count);
  188                    Mock ito.when(i ClaimRepos itoryMock. findClaimS tatusByCla imIndex(99 9999L)).th enReturn(c laim);
  189                                      
  190                    Mock ito.when(d isapproveM ockService .getClaims ToDisappro ve(claimId s)).thenRe turn(disap proveClaim sPage);
  191                    
  192                    try  {
  193                             disapp roveClaims Page = dis approveMoc kService.g etClaimsTo Disapprove (claimIds) ;
  194                             assert Equals(dis approveCla imsPage.ge tClaimsToD isapprove( ).get(0).g etVeteranN ame(), "DO MINIQUE RO DGERS-CROM ARTIE");
  195                    } ca tch (Gener icExceptio n e) {
  196                             logger .info("Tes t case pas sed with n o exceptio ns");
  197                             e.prin tStackTrac e();
  198                    }
  199           }
  200           */
  201           @T est
  202           pu blic void  test_okDis approvals( ) {
  203           
  204                    List <RejectedC laimReques t> rejecte dClaimRequ estList =  new ArrayL ist<Reject edClaimReq uest>();
  205                    Reje ctedClaimR equest rej ectedClaim Request =  new Reject edClaimReq uest();
  206                    reje ctedClaimR equest.set ClaimId(99 9997L);
  207                    reje ctedClaimR equest.set ReviewersC omments("T est1 Comme nts");
  208                    reje ctedClaimR equestList .add(rejec tedClaimRe quest);
  209                    
  210                    Stri ng userNam e = "TestU ser";
  211                    
  212                    bool ean isSucc ess = fals e;
  213                    try  {
  214                             isSucc ess = disa pproveMock Service.ok Disapprova ls(rejecte dClaimRequ estList, u serName);
  215                    } ca tch (Gener icExceptio n e) {
  216                             e.prin tStackTrac e();
  217                    }
  218                    asse rtEquals(i sSuccess,  true);
  219           }
  220           
  221           @T est
  222           pu blic void  test_rever seDisappro vals() {
  223           
  224                    List <RejectedC laimReques t> rejecte dClaimRequ estList =  new ArrayL ist<Reject edClaimReq uest>();
  225                    Reje ctedClaimR equest rej ectedClaim Request =  new Reject edClaimReq uest();
  226                    reje ctedClaimR equest.set ClaimId(99 9998L);
  227                    reje ctedClaimR equest.set ReviewersC omments("T est1 Comme nts");
  228                    reje ctedClaimR equestList .add(rejec tedClaimRe quest);
  229                    
  230                    Stri ng userNam e = "TestU ser";
  231                    
  232                    bool ean isSucc ess = fals e;
  233                    try  {
  234                             isSucc ess = disa pproveMock Service.re verseDisap provals(re jectedClai mRequestLi st, userNa me);
  235                    } ca tch (Gener icExceptio n e) {
  236                             e.prin tStackTrac e();
  237                    }
  238                    asse rtEquals(i sSuccess,  true);
  239           }
  240   }