106. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/2/2019 1:06:58 PM Central Daylight 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.

106.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\ARS_Backend\ars_app\src\test\java\gov\va\med\ewv\util EwvNullsLastSortedListTest.java Wed Mar 27 19:21:17 2019 UTC
2 C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\test\java\gov\va\med\ewv\util EwvNullsLastSortedListTest.java Fri Mar 29 17:48:17 2019 UTC

106.2 Comparison summary

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

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

106.4 Active regular expressions

No regular expressions were active.

106.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.e wv.util;
  5  
  6   import sta tic gov.va .med.ewv.u til.EwvNul lsLastSort edList.get EwvService LinesList;
  7   import sta tic gov.va .med.ewv.u til.EwvNul lsLastSort edList.get SortedList ;
  8   import sta tic gov.va .med.ewv.u til.EwvSet ToNullsLas tList.getE wvSvcLineD meList;
  9   import sta tic gov.va .med.ewv.u til.NullsL astCompara tor.localD ateUSA;
  10   import sta tic gov.va .med.ewv.u til.NullsL astCompara tor.nullsL astBigDeci malCompara tor;
  11   import sta tic gov.va .med.ewv.u til.NullsL astCompara tor.nullsL astLocalDa teStringCo mparator;
  12   import sta tic gov.va .med.ewv.u til.NullsL astCompara tor.nullsL astStringC omparator;
  13   //import s tatic gov. va.med.ewv .util.SetT oSortedLis t.toSorted List;
  14   import sta tic org.ju nit.Assert .assertEqu als;
  15   import sta tic org.ju nit.Assert .assertNot Equals;
  16   import sta tic org.ju nit.Assert .assertTru e;
  17  
  18   import jav a.math.Big Decimal;
  19   import jav a.time.Loc alDate;
  20   import jav a.util.Col lections;
  21   import jav a.util.Com parator;
  22   import jav a.util.Has hSet;
  23   import jav a.util.Lis t;
  24   import jav a.util.Set ;
  25   import jav a.util.fun ction.BiCo nsumer;
  26   import jav a.util.fun ction.BiFu nction;
  27   import jav a.util.fun ction.Func tion;
  28   import jav a.util.fun ction.Supp lier;
  29   import jav a.util.str eam.Collec tors;
  30   import jav a.util.str eam.IntStr eam;
  31   import jav a.util.str eam.Stream ;
  32  
  33   import org .junit.Aft er;
  34   import org .junit.Aft erClass;
  35   import org .junit.Bef ore;
  36   import org .junit.Bef oreClass;
  37   import org .junit.Ign ore;
  38   import org .junit.Tes t;
  39  
  40   import gov .va.med.do main.ewv.E wvAmbulanc eInfo5010;
  41   import gov .va.med.do main.ewv.E wvClaimOhi s;
  42   import gov .va.med.do main.ewv.E wvClaims;
  43   import gov .va.med.do main.ewv.E wvServiceL ineOhiAdjt mts;
  44   import gov .va.med.do main.ewv.E wvServiceL ineOhis;
  45   import gov .va.med.do main.ewv.E wvServiceL ines;
  46   import gov .va.med.do main.ewv.E wvServiceL inesDrugs;
  47   import gov .va.med.do main.ewv.E wvSlProvid er;
  48   import gov .va.med.do main.ewv.E wvSvcLineD me;
  49   import gov .va.med.do main.ewv.E wvSvcLineT eeth;
  50  
  51   /**
  52    * @author   DNS     BadgeB
  53    *
  54    */
  55   public cla ss EwvNull sLastSorte dListTest  {
  56  
  57           //  sample cl ass contai ning Set<>  for testi ng toSorte dList
  58           st atic List< Integer> i ntegerList (int ...iA rr)
  59           {
  60                    retu rn IntStre am.of(iArr )
  61                    .box ed()
  62                    .col lect(Colle ctors.toLi st());
  63           }
  64  
  65           st atic Set<I nteger> in tegerSet(i nt ...iArr )
  66           {
  67                    retu rn IntStre am.of(iArr )
  68                    .box ed()
  69                    .col lect(Colle ctors.toSe t());
  70           }
  71  
  72           cl ass HasInt egerSet {
  73  
  74                    Set< Integer> i Set;
  75                    Set< Integer> g etISet() {  return iS et; }
  76  
  77                    HasI ntegerSet( int ...iAr r)
  78                    {
  79                             this.i Set = inte gerSet(iAr r);
  80                    }
  81  
  82           }
  83  
  84           st atic int[]  iArr = {3 ,1,4,1,5,9 ,2,6,5,3,5 ,8,9};         // Ver y specific , do not c hange
  85           st atic List< Integer> i Dist1 = In tStream.of (iArr)
  86                             .disti nct()      // {3,1,4, 5,9,2,6,8}
  87                             .sorte d()        // {1,2,3, 4,5,6,8,9}
  88                             .boxed ()         // Integer ({1,2,3,4, 5,6,8,9})
  89                             .map(( iv) -> { r eturn iv.e quals(1) ?  null : iv ; })       // convert  Integer(1 ) to null  (at beginn ing) 
  90                             .colle ct(Collect ors.toList ());  // { null, Inte ger(2), In teger(3),  Integer(4) , Integer( 5), Intege r(6), Inte ger(8), In teger(9)}
  91           
  92           st atic List< Integer> i Dist9 = In tStream.of (iArr)
  93                             .disti nct()
  94                             .sorte d()
  95                             .boxed ()
  96                             .map(( iv) -> { r eturn iv.e quals(9) ?  null : iv ; })       // convert  Integer(9 ) to null  at end
  97                             .colle ct(Collect ors.toList ());  // { Integer(1) , Integer( 2), Intege r(3), Inte ger(4), In teger(5),  Integer(6) , Integer( 8), null}
  98  
  99           st atic Set<I nteger> iS et1 = IntS tream.of(i Arr)
  100                             .boxed ()
  101                             .map(( iv) -> { r eturn iv.e quals(1) ?  null : iv ; })       // convert  Integer(1 ) to null 
  102                             .colle ct(Collect ors.toSet( ));   // Y ou can put  a null in  a set
  103  
  104           st atic Set<I nteger> iS et9 = IntS tream.of(i Arr)
  105                             .boxed ()
  106                             .map(( iv) -> { r eturn iv.e quals(9) ?  null : iv ; })       // convert  Integer(9 ) to null 
  107                             .colle ct(Collect ors.toSet( ));
  108  
  109           st atic List< Integer> i List = Int Stream.of( iArr)
  110                             .boxed ().collect (Collector s.toList() );
  111           st atic Set<I nteger> iS et = IntSt ream.of(iA rr)
  112                             .boxed ().collect (Collector s.toSet()) ;
  113  
  114           /* *
  115            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvClaimOh isList(gov .va.med.do main.ewv.E wvClaims)} .
  116            * /
  117           pu blic stati c <T, E> v oid testGe tList_null s(
  118                             Suppli er<T> newT ,
  119                             BiCons umer<T, Se t<E>> setE Set,
  120                             Functi on<T, List <E>> getEL ist
  121                             ) {
  122   //      pu blic stati c List<Ewv ClaimOhis>  getEwvCla imOhisList (EwvClaims  obj) {
  123   //               retu rn sortedL ist(obj, E wvClaims:: getEwvClai mOhises, E wvNullsLas tComparato r::compare );
  124   //      }
  125                    T ob j = newT.g et();
  126                    Set< E> emptySe t = Collec tions.<E>e mptySet();
  127                    List <E> emptyL ist = Coll ections.<E >emptyList ();
  128                    
  129   //               Set< E> set = n ull;
  130                    List <E> list =  null;
  131  
  132                    // t est null o bj
  133                    list  = getELis t.apply(nu ll);
  134                    asse rtEquals(l ist, empty List);
  135                    
  136   //               // t est null s etEwvServi ceLineses
  137                    setE Set.accept (obj, null );
  138                    list  = getELis t.apply(ob j);
  139                    asse rtEquals(l ist, empty List);
  140   //               
  141   //               // t est empty  setEwvServ iceLineses
  142                    setE Set.accept (obj, empt ySet);
  143                    list  = getELis t.apply(ob j);
  144                    asse rtEquals(l ist, empty List);
  145                    
  146           }
  147  
  148           pu blic stati c <T, E> v oid testSe t_GetList_ LocalDateS tring_Stri ng_BigDeci mal(
  149                             Suppli er<T> newT ,
  150                             BiCons umer<T, Se t<E>> setE Set,
  151                             Functi on<T, List <E>> getEL ist,
  152                             Suppli er<E> newE ,
  153                             BiCons umer<E, St ring> setE 0,
  154                             BiCons umer<E, St ring> setE 1,
  155                             BiCons umer<E, Bi gDecimal>  setE2,
  156                             Stream <String> d ata,
  157                             Compar ator<E> co mpE
  158                             ) {
  159  
  160                    T ob j = newT.g et();
  161                    
  162                    Set< E> testSet  = new Has hSet<E>();
  163                    List <E> list =  null;
  164  
  165                    Set< E> data1Se t = genDat e_LocalDat eString_St ring_BigDe cimal(
  166                             newE,
  167                             setE0,
  168                             setE1,
  169                             setE2,
  170                             data
  171                             );
  172  
  173                    test Set.addAll (data1Set) ;
  174                    
  175                    E it  = null;
  176  
  177                    // G enerate so me data
  178                    // A  Set is in  "random"  order so w e probably  don't hav e to shuff le the lis t
  179                    Set< E> binaryC hoiceSet =  new HashS et<E>(); 
  180  
  181                    for(  String dd  : "01|17" .split("\\ |")) {
  182                             for( S tring mm :  "03|10".s plit("\\|" )) {
  183                                      for (Str ing yyyy :  "2003|201 8".split(" \\|")) {
  184                                               String dat e = String .join("/",  mm, dd, y yyy);
  185                                               for(String  code : "P C|CP".spli t("\\|"))  {
  186                                                       fo r(String l n : "3|7". split("\\| ")) {
  187                                                                long  lineNo =  Long.parse Long(ln);
  188  
  189                                                                it =  newE.get( );
  190                                                                setE 0.accept(i t,date);
  191                                                                setE 1.accept(i t,code);
  192                                                                setE 2.accept(i t,new BigD ecimal(lin eNo * 0.1) );
  193                                                                bina ryChoiceSe t.add(it);
  194                                                       }
  195                                               }
  196                                      }
  197                             }
  198                    }
  199  
  200                    test Set.addAll (binaryCho iceSet);
  201  
  202                    // S et the tes t case
  203                    setE Set.accept (obj,testS et);
  204  
  205                    // D o the oper ation
  206                    list  = getELis t.apply(ob j);
  207  
  208                    // C heck the r esult
  209                    // W e need to  compare ea ch element  with the  next eleme nt.
  210                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  211                    //
  212                    test List(list,  (prev, cu rr) -> {re turn compE .compare(p rev, curr)  < 0;});
  213           }
  214  
  215           pu blic stati c <T, E> v oid testSe t_GetList_ String_Loc alDateStri ng_BigDeci mal(
  216                             Suppli er<T> newT ,
  217                             BiCons umer<T, Se t<E>> setE Set,
  218                             Functi on<T, List <E>> getEL ist,
  219                             Suppli er<E> newE ,
  220                             BiCons umer<E, St ring> setE 0,
  221                             BiCons umer<E, St ring> setE 1,    // L ocal Date  String
  222                             BiCons umer<E, Bi gDecimal>  setE2,
  223                             Stream <String> d ata,
  224                             Compar ator<E> co mpE
  225                             ) {
  226  
  227                    T ob j = newT.g et();
  228                    
  229                    Set< E> testSet  = new Has hSet<E>();
  230                    List <E> list =  null;
  231  
  232                    Set< E> data1Se t = genDat e_LocalDat eString_St ring_BigDe cimal(
  233                             newE,
  234                             setE1,   // swap  to LocalDa te
  235                             setE0,   // use S tring
  236                             setE2,
  237                             data
  238                             );
  239  
  240                    test Set.addAll (data1Set) ;
  241                    
  242                    E it  = null;
  243  
  244                    // G enerate so me data
  245                    // A  Set is in  "random"  order so w e probably  don't hav e to shuff le the lis t
  246                    Set< E> binaryC hoiceSet =  new HashS et<E>(); 
  247  
  248                    for( String cod e : "PC|CP ".split("\ \|")) {
  249                             for( S tring dd :  "01|17".s plit("\\|" )) {
  250                                      for( Str ing mm : " 03|10".spl it("\\|"))  {
  251                                               for (Strin g yyyy : " 2003|2018" .split("\\ |")) {
  252                                                       St ring date  = String.j oin("/", m m, dd, yyy y);
  253                                                       fo r(String l n : "3|7". split("\\| ")) {
  254                                                                long  lineNo =  Long.parse Long(ln);
  255  
  256                                                                it =  newE.get( );
  257                                                                setE 0.accept(i t,code);
  258                                                                setE 1.accept(i t,date);
  259                                                                setE 2.accept(i t,new BigD ecimal(lin eNo * 0.1) );
  260                                                                bina ryChoiceSe t.add(it);
  261                                                       }
  262                                               }
  263                                      }
  264                             }
  265                    }
  266  
  267                    test Set.addAll (binaryCho iceSet);
  268  
  269                    // S et the tes t case
  270                    setE Set.accept (obj,testS et);
  271  
  272                    // D o the oper ation
  273                    list  = getELis t.apply(ob j);
  274  
  275                    // C heck the r esult
  276                    // W e need to  compare ea ch element  with the  next eleme nt.
  277                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  278                    //
  279                    test List(list,  (prev, cu rr) -> {re turn compE .compare(p rev, curr)  < 0;});
  280           }
  281  
  282           pu blic stati c <T, E> v oid testSe t_GetListS SS(
  283                             Suppli er<T> newT ,
  284                             BiCons umer<T, Se t<E>> setE Set,
  285                             Functi on<T, List <E>> getEL ist,
  286                             Suppli er<E> newE ,
  287                             BiCons umer<E, St ring> setE 0,
  288                             BiCons umer<E, St ring> setE 1,
  289                             BiCons umer<E, St ring> setE 2,
  290                             Stream <String> d ata,
  291                             Compar ator<E> co mpE
  292                             ) {
  293  
  294                    T ob j = newT.g et();
  295                    
  296                    Set< E> testSet  = new Has hSet<E>();
  297                    List <E> list =  null;
  298  
  299                    Set< E> data1Se t = genDat aSSS(
  300                             newE,
  301                             setE0,
  302                             //setE 1,
  303                             setE2,
  304                             data
  305                             );
  306  
  307                    test Set.addAll (data1Set) ;
  308                    
  309                    E it  = null;
  310  
  311                    // G enerate so me data
  312                    // A  Set is in  "random"  order so w e probably  don't hav e to shuff le the lis t
  313                    Set< E> binaryC hoiceSet =  new HashS et<E>(); 
  314  
  315                    for(  String dd  : "01|17" .split("\\ |")) {
  316                             for( S tring mm :  "03|10".s plit("\\|" )) {
  317                                      for (Str ing yyyy :  "2003|201 8".split(" \\|")) {
  318                                               String dat e = String .join("/",  mm, dd, y yyy);
  319                                               for(String  code : "P C|CP".spli t("\\|"))  {
  320                                                       fo r(String l n : "3|7". split("\\| ")) {
  321                                                                long  lineNo =  Long.parse Long(ln);
  322  
  323                                                                it =  newE.get( );
  324                                                                setE 0.accept(i t,date);
  325                                                                setE 1.accept(i t,code);
  326                                                                setE 2.accept(i t,ln);
  327                                                                bina ryChoiceSe t.add(it);
  328                                                       }
  329                                               }
  330                                      }
  331                             }
  332                    }
  333  
  334                    test Set.addAll (binaryCho iceSet);
  335  
  336                    // S et the tes t case
  337                    setE Set.accept (obj,testS et);
  338  
  339                    // D o the oper ation
  340                    list  = getELis t.apply(ob j);
  341  
  342                    // C heck the r esult
  343                    // W e need to  compare ea ch element  with the  next eleme nt.
  344                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  345                    //
  346                    test List(list,  (prev, cu rr) -> {re turn compE .compare(p rev, curr)  < 0;});
  347           }
  348  
  349           pu blic stati c <T, E> v oid testSe t_GetList(
  350                                      T obj,
  351                                      Set<E> s et,
  352                                      BiConsum er<T, Set< E>> setESe t,
  353                                      Function <T, List<E >> getELis t,
  354                                      Comparat or<E> comp E
  355                                      ) {
  356                    setE Set.accept (obj, set) ;                                  // Set t he test ca se
  357                    List <E> list =  getEList. apply(obj) ;              // Do  the operat ion
  358                    test List(list,  (a,b) ->  { return c ompE.compa re(a, b) <  1; });                                       // Check  the resul t
  359           }        
  360  
  361           pu blic stati c <E> void  testList(
  362                             List<E > list,
  363                             BiFunc tion<E, E,  Boolean>  testE
  364                             ) {
  365  
  366                    // C heck the r esult
  367                    // W e need to  compare ea ch element  with the  next eleme nt.
  368                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  369                    //
  370  
  371                    bool ean havePr ev = false ;
  372                    E pr ev = null;
  373                    for  (E curr :  list) {
  374                             if (ha vePrev) {
  375                                      assertTr ue( testE. apply(prev , curr) );                    
  376                             }
  377                             prev =  curr;     // remembe r for next  time
  378                             havePr ev = true;  // rememb er that we  remember
  379                    }
  380           }        
  381  
  382           pu blic stati c String[]  data1 = {
  383                             // Mak e sure it  is handled  as a date : Choose d ateStrings  that sort  different ly than St rings
  384                             // Cha nge #1, #2 , #3
  385  
  386                             // Cha nge #1, #2 , #3 Year  vs. Month  Day
  387                             "10/29 /2018|PC3| 23", 
  388                             "10/28 /2018|PC1| 23", 
  389                             "10/27 /2018|PC4| 23", 
  390                             "10/26 /2018|PC3| 32", 
  391                             "10/25 /2018|PC1| 32", 
  392                             "10/24 /2018|PC4| 32", 
  393                             
  394                             "10/29 /2017|PC3| 23", 
  395                             "10/29 /2017|PC1| 23", 
  396                             "10/29 /2017|PC4| 23", 
  397                             "10/29 /2017|PC3| 32", 
  398                             "10/29 /2017|PC1| 32", 
  399                             "10/29 /2017|PC4| 32", 
  400  
  401                             "10/29 /1957|PC3| 23", 
  402                             "10/29 /1957|PC1| 23", 
  403                             "10/29 /1957|PC4| 23", 
  404                             "10/29 /1957|PC3| 32", 
  405                             "10/29 /1957|PC1| 32", 
  406                             "10/29 /1957|PC4| 32", 
  407  
  408                             // Cha nge #2, #3
  409                             "10/29 /1|PC3|23"
  410                             "10/29 /2018|PC1| 23", 
  411                             "10/29 /2018|PC4| 23", 
  412                             "10/29 /2018|PC3| 32", 
  413                             "10/29 /2018|PC1| 32", 
  414                             "10/29 /2018|PC4| 32", 
  415                             // Cha nge #3
  416                             "10/29 /2001|PC|3 3", 
  417                             "10/29 /2001|PC|3 1", 
  418                             "10/29 /2001|PC|3 4", 
  419                             };
  420  
  421           pu blic stati c <T, E0,  E1, E2> Se t<T> genDa taSSS(
  422                             Suppli er<T> newT ,
  423                             BiCons umer<T,Str ing> setE0 ,
  424                             //BiCo nsumer<T,  String> se tE1,
  425                             BiCons umer<T, St ring> setE 2,
  426                             Stream <String> d ata) {
  427                    Set< T> set = d ata
  428                                      .map((ro w) -> {
  429                                               String[] c ols = row. split("\\| ");
  430           
  431                                               T obj = ne wT.get();
  432                                               if (cols.l ength > 0)  setE0.acc ept(obj, c ols[0]);
  433                                               //if (cols .length >  1) setE1.a ccept(obj,  cols[1]);
  434                                               if (cols.l ength > 2)  setE2.acc ept(obj, c ols[2]);
  435                                               return obj ; })
  436                                      .collect (Collector s.toSet()) ;
  437                    retu rn set;
  438           }        
  439           pu blic stati c <T, E0,  E1, E2> Se t<T> genDa te_LocalDa teString_S tring_BigD ecimal(
  440                             Suppli er<T> newT ,
  441                             BiCons umer<T,Str ing> setE0 ,
  442                             BiCons umer<T, St ring> setE 1,
  443                             BiCons umer<T, Bi gDecimal>  setE2,
  444                             Stream <String> d ata) {
  445                    Set< T> set = d ata
  446                                      .map((ro w) -> {
  447                                               String[] c ols = row. split("\\| ");
  448           
  449                                               T obj = ne wT.get();
  450                                               if (cols.l ength > 0)  setE0.acc ept(obj, c ols[0]);
  451                                               if (cols.l ength > 1)  setE1.acc ept(obj, c ols[1]);
  452                                               if (cols.l ength > 2)  setE2.acc ept(obj, n ew BigDeci mal(Long.p arseLong(c ols[2]) *  0.1));
  453                                               return obj ; })
  454                                      .collect (Collector s.toSet()) ;
  455                    retu rn set;
  456           }        
  457           
  458           /* *
  459            *  @throws j ava.lang.E xception
  460            * /
  461           @B eforeClass
  462           pu blic stati c void set UpBeforeCl ass() thro ws Excepti on {
  463           }
  464  
  465           /* *
  466            *  @throws j ava.lang.E xception
  467            * /
  468           @A fterClass
  469           pu blic stati c void tea rDownAfter Class() th rows Excep tion {
  470           }
  471  
  472           /* *
  473            *  @throws j ava.lang.E xception
  474            * /
  475           @B efore
  476           pu blic void  setUp() th rows Excep tion {
  477           }
  478  
  479           /* *
  480            *  @throws j ava.lang.E xception
  481            * /
  482           @A fter
  483           pu blic void  tearDown()  throws Ex ception {
  484           }
  485  
  486           /* *
  487            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get SortedList (java.lang .Object, j ava.util.f unction.Fu nction, ja va.util.Co mparator)} .
  488            * /
  489           @T est
  490           pu blic void  testGetSor tedList()  {
  491   //               publ ic static  <T, R> Lis t<R> sorte dList(T ob j, Functio n<T, Set<R >> getSet,  Comparato r<R> compa re) {
  492   //                        if (ob j == null)  {
  493   //                                 // We ca n hardly e xtract a s et from a  null objec t.
  494   //                                 // We co uld just r eturn null , and let  the caller  handle it
  495   //                                 // but w e can retu rn an empt y list, wh ich is eas ier to han dle.
  496   //                                 return C ollections .<R>emptyL ist();
  497   //                        }
  498   //                        Set<R>  set = get Set.apply( obj);
  499   //                        // Now , set coul d also be  null, but  toSortedLi st will al so return  an empty l ist in tha t case.
  500   //                        return  toSortedL ist(set, c ompare);
  501   //               }
  502                    List <Integer>  iSort = nu ll;
  503                    // T est that a  null args  are handl ed.
  504                    HasI ntegerSet  hasItNull  = null;
  505                    
  506                    asse rtNotEqual s(iSort, C ollections .<Integer> emptyList( ));        // iSort i s null
  507  
  508                    iSor t = EwvNul lsLastSort edList.get SortedList (hasItNull , HasInteg erSet::get ISet, Inte ger::compa re);
  509                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  510                    
  511                    iSor t = EwvNul lsLastSort edList.get SortedList (hasItNull , HasInteg erSet::get ISet, Inte ger::compa re);
  512                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  513  
  514                    iSor t = EwvNul lsLastSort edList.get SortedList (null, nul l, Integer ::compare) ;     // d on't extra ct, don't  compare 
  515                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  516                    
  517                    iSor t = EwvNul lsLastSort edList.get SortedList (null, nul l, null);  // how doe s it resol ve? 
  518                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  519                    
  520                    iSor t = getSor tedList(ha sItNull, H asIntegerS et::getISe t, Integer ::compare) ;
  521                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  522                    
  523                    iSor t = getSor tedList(ha sItNull, H asIntegerS et::getISe t, Integer ::compare) ;
  524                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  525  
  526                    iSor t = getSor tedList(nu ll, null,  null);         // how  does it r esolve? 
  527                    asse rtEquals(i Sort, Coll ections.<I nteger>emp tyList());
  528                    
  529                    // 
  530                    HasI ntegerSet  hasIt314 =  new HasIn tegerSet(3 ,1,4,1,5,9 ,2,6,5,3,5 ,8,9);
  531                    iSor t = getSor tedList(ha sIt314, Ha sIntegerSe t::getISet , Integer: :compare);       // 
  532                    asse rtEquals(i Sort, inte gerList(1, 2,3,4,5,6, 8,9));
  533  
  534           }
  535  
  536           /* *
  537            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvService LinesList( gov.va.med .domain.ew v.EwvClaim s)}.
  538            * /
  539           @T est
  540           pu blic void  testGetEwv ServiceLin esList() {
  541   //               .com paring(Ewv ServiceLin es::getBeg inDateOfSe rvice, nul lsLastLoca lDateStrin gComparato r)
  542   //               .the nComparing (EwvServic eLines::ge tProcedure Code, null sLastStrin gComparato r)
  543   //               .the nComparing (EwvServic eLines::ge tLineNumbe r, Long::c ompare)    // This mi ght be all  that is n eeded
  544                    test GetList_nu lls(
  545                                      EwvClaim s::new,
  546                                      EwvClaim s::setEwvS erviceLine ses,
  547                                      EwvNulls LastSorted List::getE wvServiceL inesList
  548                                      );
  549  
  550                    EwvC laims obj  = new EwvC laims();
  551                    
  552                    Set< EwvService Lines> esl TestSet =  new HashSe t<EwvServi ceLines>() ;
  553                    List <EwvServic eLines> li st = null;
  554  
  555                    Set< EwvService Lines> dat a1Set = ge nDataSSS(
  556                                      EwvServi ceLines::n ew,
  557                                      EwvServi ceLines::s etBeginDat eOfService ,
  558                                      //EwvSer viceLines: :setProced ureCode,
  559                                      (esl, st r) -> { es l.setLineN umber(Long .parseLong (str)); },
  560                                      Stream.o f(data1)
  561                                      );
  562  
  563                    eslT estSet.add All(data1S et);
  564                    
  565                    EwvS erviceLine s esl = nu ll;
  566  
  567                    // G enerate so me data
  568                    // A  Set is in  "random"  order so w e probably  don't hav e to shuff le the lis t
  569                    Set< EwvService Lines> bin aryChoiceS et = new H ashSet<Ewv ServiceLin es>(); 
  570  
  571                    for(  String dd  : "01|17" .split("\\ |")) {
  572                             for( S tring mm :  "03|10".s plit("\\|" )) {
  573                                      for (Str ing yyyy :  "2003|201 8".split(" \\|")) {
  574                                               String dat e = String .join("/",  mm, dd, y yyy);
  575                                               for(String  code : "P C|CP".spli t("\\|"))  {
  576                                                       fo r(String l n : "3|7". split("\\| ")) {
  577                                                                long  lineNo =  Long.parse Long(ln);
  578  
  579                                                                esl  = new EwvS erviceLine s();
  580                                                                esl. setBeginDa teOfServic e(date);
  581                                                                //es l.setProce dureCode(c ode);
  582                                                                esl. setLineNum ber(lineNo );
  583                                                                bina ryChoiceSe t.add(esl) ;
  584  
  585                                                       }
  586                                               }
  587                                      }
  588                             }
  589                    }
  590  
  591                    eslT estSet.add All(binary ChoiceSet) ;
  592  
  593                    // S et the tes t case
  594                    obj. setEwvServ iceLineses (eslTestSe t);
  595  
  596                    // D o the oper ation
  597                    list  = getEwvS erviceLine sList(obj) ;
  598  
  599                    // C heck the r esult
  600                    // W e need to  compare ea ch element  with the  next eleme nt.
  601                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  602                    //
  603                    Comp arator<Ewv ServiceLin es> compEw vServiceLi nes = Comp arator.nul lsLast(Com parator
  604                                      .compari ng(EwvServ iceLines:: getBeginDa teOfServic e, nullsLa stLocalDat eStringCom parator)
  605                                      //.thenC omparing(E wvServiceL ines::getP rocedureCo de, nullsL astStringC omparator)
  606                                      .thenCom paring(Ewv ServiceLin es::getLin eNumber, L ong::compa re)
  607                                      );
  608                    //te stList(lis t, (prev,  curr) -> { return com pEwvServic eLines.com pare(prev,  curr) < 0 ;});
  609                    
  610                    // B ut what if  Comparato rs are bro ken, misap plied? Do  it in the  raw:
  611                    BiFu nction<Ewv ServiceLin es, EwvSer viceLines,  Boolean>  cmpEwvServ iceLines =
  612                                      (cmp0, c mp1) -> {
  613                                               String d0  = cmp0.get BeginDateO fService() ;
  614                                               String d1  = cmp1.get BeginDateO fService() ;
  615                                               int ds = n ullsLastLo calDateStr ingCompara tor.compar e(d0, d1);     // d s ign
  616                                               if (ds ==  0) {
  617                                                       /* String p0  = cmp0.get ProcedureC ode();
  618                                                       St ring p1 =  cmp1.getPr ocedureCod e();
  619                                                       in t ps = nul lsLastStri ngComparat or.compare (p0, p1);
  620                                                       if  (ps == 0)  {*/
  621                                                                long  l0 = cmp0 .getLineNu mber();
  622                                                                long  l1 = cmp1 .getLineNu mber();
  623                                                                int  ls = Long. compare(l0 , l1);
  624                                                                retu rn ls < 1;
  625                                                       /* } else {
  626                                                                retu rn ps < 1;
  627                                                       }* /
  628                                               } else {
  629                                                       re turn ds <  1;
  630                                               }
  631                                      };
  632                                      
  633                    test List(list,  cmpEwvSer viceLines) ;
  634                    
  635                    // B ut what if  Comparato rs are bro ken, misap plied? Do  it in the  raw: Even  breaking N ullsLast d own
  636                    BiFu nction<Ewv ServiceLin es, EwvSer viceLines,  Boolean>  cmpNullsLa stEwvServi ceLines =
  637                                      (cmp0, c mp1) -> {
  638                                               String d0  = cmp0.get BeginDateO fService() ;
  639                                               String d1  = cmp1.get BeginDateO fService() ;
  640                                               LocalDate  ld0 = loca lDateUSA(d 0);
  641                                               LocalDate  ld1 = loca lDateUSA(d 1);
  642  
  643                                               int ds = d 0 == null
  644                                                                         ? // n ull0
  645                                                                         (d1 ==  null
  646                                                                                  ? 0 // n ull0 == nu ll1 
  647                                                                                  : 1      // null0 >  any1
  648                                                                                  )
  649                                                                         : // a ny0
  650                                                                         (d1 ==  null
  651                                                                                  ? -1 //   any0 < nu ll0 
  652   //                                                                                              :  localDateU SA(d0).com pareTo(loc alDateUSA( d1))); //  this gets  NPE becaus e localDat eUSA("xx")  => null
  653                                                                                                   :  (ld0 == nu ll 
  654                                                                                                            ? (l d1 == null  
  655                                                                                                                     ? 0 //  both null
  656                                                                                                                     : 1 //  Null > an y
  657                                                                                                                     )
  658                                                                                                            : (l d1 == null  ? -1 // n ullsLast
  659                                                                                                                              : ld0.co mpareTo(ld 1))
  660                                                                                                            )
  661                                                                         );
  662                                                                         // Thi s is why w e use null sLast()
  663                                               if (ds ==  0) {
  664                                                       /* String p0  = cmp0.get ProcedureC ode();
  665                                                       St ring p1 =  cmp1.getPr ocedureCod e();
  666                                                       in t ps = p0  == null ?  (p1 == nul l ? 0 : 1)       // m ake nullsL ast ? 0 {n ull == nul l} : 1 {nu ll > anyOt her}
  667                                                                     : (p1 == n ull ? -1 :  p0.compar eTo(p1));
  668                                                       if  (ps == 0)  {*/
  669                                                                // p rimitive l ong cannot  be null
  670                                                                long  l0 = cmp0 .getLineNu mber();
  671                                                                long  l1 = cmp1 .getLineNu mber();
  672                                                                int  ls = Long. compare(l0 , l1);
  673                                                                retu rn ls < 1;
  674                                                       /* } else {
  675                                                                retu rn ps < 1;
  676                                                       }* /
  677                                               } else {
  678                                                       re turn ds <  1;
  679                                               }
  680                                      };
  681                                      
  682                    test List(list,  cmpNullsL astEwvServ iceLines);
  683                    
  684                    // S ome items  should be  null, to f ully check . But we a lready tes t that in  SetToSorte dList
  685                    
  686           }
  687  
  688           /* *
  689            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvClaimOh isList(gov .va.med.do main.ewv.E wvClaims)} .
  690            * /
  691           @T est
  692           pu blic void  testGetEwv ClaimOhisL ist() {
  693   //      pu blic stati c List<Ewv ClaimOhis>  getEwvCla imOhisList (EwvClaims  obj) {
  694   //               retu rn sortedL ist(obj, E wvClaims:: getEwvClai mOhises, E wvNullsLas tComparato r::compare );
  695   //      }
  696   //               Comp arator.nul lsLast(Com parator
  697   //                                 .compari ng(EwvClai mOhis::get PaymentSeq uenceIndic ator, null sLastStrin gComparato r) 
  698   //                                 .thenCom paring(Ewv ClaimOhis: :getClaimA djustmentD ate, nulls LastLocalD ateStringC omparator)
  699   //                                 .thenCom paring(Ewv ClaimOhis: :getOhiPay erId, null sLastStrin gComparato r)
  700   //                                 .thenCom paring(Ewv ClaimOhis: :getSubscr iberPayerI d, nullsLa stStringCo mparator)
  701   //                                 .thenCom paring(Ewv ClaimOhis: :getOtherP ayerName,  nullsLastS tringCompa rator)
  702   //                                 .thenCom paring(Ewv ClaimOhis: :getOhiGro upName, nu llsLastStr ingCompara tor)
  703   //                                 .thenCom paring(Ewv ClaimOhis: :getFiling Indicator,  nullsLast StringComp arator)
  704   //                                 .thenCom paring(Ewv ClaimOhis: :getBenefi tsAssignme ntIndicato r, nullsLa stStringCo mparator)
  705   //                                 .thenCom paring(Ewv ClaimOhis: :getInsura nceType, n ullsLastSt ringCompar ator)
  706   //                                 .thenCom paring(Ewv ClaimOhis: :getCobSub mittedChar ges, nulls LastString Comparator )
  707   //                                 .thenCom paring(Ewv ClaimOhis: :getCobTot alAllowedA mt, nullsL astStringC omparator)
  708   //                                 .thenCom paring(Ewv ClaimOhis: :getCobApp rovedAmt,  nullsLastS tringCompa rator)
  709   //                                 .thenCom paring(Ewv ClaimOhis: :getCobTot alNoncover edAmt, nul lsLastStri ngComparat or)
  710   //                                 .thenCom paring(Ewv ClaimOhis: :getCobPay erPaidAmt,  nullsLast StringComp arator)
  711   //                                 .thenCom paring(Ewv ClaimOhis: :getCobTot alDeniedAm t, nullsLa stStringCo mparator)
  712   //                                 .thenCom paring(Ewv ClaimOhis: :getCobTot alMedicare PaidAmt, n ullsLastSt ringCompar ator)
  713   //                                 .thenCom paring(Ewv ClaimOhis: :getCobPat ientPaidAm t, nullsLa stStringCo mparator)
  714   //                                 .thenCom paring(Ewv ClaimOhis: :getCobMed icarePaidA mt100, nul lsLastStri ngComparat or)
  715   //                                 .thenCom paring(Ewv ClaimOhis: :getCobPat ientRespon sibility,  nullsLastS tringCompa rator)
  716   //                                 .thenCom paring(Ewv ClaimOhis: :getCobMed icarePaidA mt80, null sLastStrin gComparato r)
  717   //                                 .thenCom paring(Ewv ClaimOhis: :getCobMed icareATrus tFund, nul lsLastStri ngComparat or)
  718   //                                 .thenCom paring(Ewv ClaimOhis: :getCobMed icareBTrus tFund, nul lsLastStri ngComparat or)
  719   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCov eredDays,  nullsLastS tringCompa rator)
  720   //                                 .thenCom paring(Ewv ClaimOhis: :getInpLif etimeReser veDays, nu llsLastStr ingCompara tor)
  721   //                                 .thenCom paring(Ewv ClaimOhis: :getInpLif etimePsych iatricDays , nullsLas tStringCom parator)
  722   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCla imDrgAmt,  nullsLastS tringCompa rator)
  723   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCla imDispropo rShare, nu llsLastStr ingCompara tor)
  724   //                                 .thenCom paring(Ewv ClaimOhis: :getInpMsp PassThroug hAmt, null sLastStrin gComparato r)
  725   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCla imPpsCapit alAmt, nul lsLastStri ngComparat or)
  726   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalFsp DrgAmt, nu llsLastStr ingCompara tor)
  727   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalHsp DrgAmt, nu llsLastStr ingCompara tor)
  728   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalDsh DrgAmt, nu llsLastStr ingCompara tor)
  729   //                                 .thenCom paring(Ewv ClaimOhis: :getInpOld CapitalAmt , nullsLas tStringCom parator)
  730   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalIme Amt, nulls LastString Comparator )
  731   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps OperHospSp ecDrgAmt,  nullsLastS tringCompa rator)
  732   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps OperFedSpe cDrgAmt, n ullsLastSt ringCompar ator)
  733   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalOut lrAmt, nul lsLastStri ngComparat or)
  734   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCla imIndirect TeachAmt,  nullsLastS tringCompa rator)
  735   //                                 .thenCom paring(Ewv ClaimOhis: :getInpNon payablePro fComponent , nullsLas tStringCom parator)
  736   //                                 .thenCom paring(Ewv ClaimOhis: :getInpPps CapitalExc eptionAmt,  nullsLast StringComp arator)
  737   //                                 .thenCom paring(Ewv ClaimOhis: :getInpCos tReportDay Count, nul lsLastStri ngComparat or)
  738   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkCode1,  nullsLastS tringCompa rator)
  739   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkDesc1,  nullsLastS tringCompa rator)
  740   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkCode2,  nullsLastS tringCompa rator)
  741   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkDesc2,  nullsLastS tringCompa rator)
  742   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkCode3,  nullsLastS tringCompa rator)
  743   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkDesc3,  nullsLastS tringCompa rator)
  744   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkCode4,  nullsLastS tringCompa rator)
  745   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkDesc4,  nullsLastS tringCompa rator)
  746   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkCode5,  nullsLastS tringCompa rator)
  747   //                                 .thenCom paring(Ewv ClaimOhis: :getInpRem ittanceRem arkDesc5,  nullsLastS tringCompa rator)
  748   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRei mbursement Rate, null sLastStrin gComparato r)
  749   //                                 .thenCom paring(Ewv ClaimOhis: :getOptEsr dPaidAmt,  nullsLastS tringCompa rator)
  750   //                                 .thenCom paring(Ewv ClaimOhis: :getOptCla imHcpcsPay ableAmt, n ullsLastSt ringCompar ator)
  751   //                                 .thenCom paring(Ewv ClaimOhis: :getOptNon payablePro fComponent , nullsLas tStringCom parator)
  752   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkCode1,  nullsLastS tringCompa rator)
  753   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkDesc1,  nullsLastS tringCompa rator)
  754   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkCode2,  nullsLastS tringCompa rator)
  755   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkDesc2,  nullsLastS tringCompa rator)
  756   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkCode3,  nullsLastS tringCompa rator)
  757   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkDesc3,  nullsLastS tringCompa rator)
  758   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkCode4,  nullsLastS tringCompa rator)
  759   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkDesc4,  nullsLastS tringCompa rator)
  760   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkCode5,  nullsLastS tringCompa rator)
  761   //                                 .thenCom paring(Ewv ClaimOhis: :getOptRem ittanceRem arkDesc5,  nullsLastS tringCompa rator)
  762   ////                                        .thenCompa ring(EwvCl aimOhis::g etewvClaim s, nullsLa stEwvClaim sComparato r)
  763   ////                                        .thenCompa ring(EwvCl aimOhis::g etEwvClaim LevelAdjus tmentses,  nullsLastE wvClaimLev elAdjustme ntsCompara tor)
  764   //                                 .thenCom paring(Ewv ClaimOhis: :getGuid,  nullsLastB igDecimalC omparator)
  765  
  766                    test GetList_nu lls(
  767                                      EwvClaim s::new,
  768                                      EwvClaim s::setEwvC laimOhises ,
  769                                      EwvNulls LastSorted List::getE wvClaimOhi sList
  770                                      );
  771                    // S ome items  should be  null, to f ully check . But we a lready tes t that in  SetToSorte dList
  772  
  773                    test Set_GetLis t_String_L ocalDateSt ring_BigDe cimal(
  774                                      EwvClaim s::new,
  775                                      EwvClaim s::setEwvC laimOhises ,
  776                                      EwvNulls LastSorted List::getE wvClaimOhi sList,
  777                                      EwvClaim Ohis::new,
  778                                      EwvClaim Ohis::setP aymentSequ enceIndica tor,
  779                                      EwvClaim Ohis::setC laimAdjust mentDate,
  780                                      EwvClaim Ohis::setG uid,
  781                                      Stream.o f(data1),
  782                                      Comparat or.nullsLa st(Compara tor
  783                                                       .c omparing(E wvClaimOhi s::getPaym entSequenc eIndicator , nullsLas tStringCom parator) 
  784                                                       .t henCompari ng(EwvClai mOhis::get ClaimAdjus tmentDate,  nullsLast LocalDateS tringCompa rator)
  785                                                       .t henCompari ng(EwvClai mOhis::get OhiPayerId , nullsLas tStringCom parator)
  786                                                       .t henCompari ng(EwvClai mOhis::get Subscriber PayerId, n ullsLastSt ringCompar ator)
  787                                                       .t henCompari ng(EwvClai mOhis::get OtherPayer Name, null sLastStrin gComparato r)
  788                                                       .t henCompari ng(EwvClai mOhis::get OhiGroupNa me, nullsL astStringC omparator)
  789                                                       .t henCompari ng(EwvClai mOhis::get FilingIndi cator, nul lsLastStri ngComparat or)
  790                                                       .t henCompari ng(EwvClai mOhis::get BenefitsAs signmentIn dicator, n ullsLastSt ringCompar ator)
  791                                                       .t henCompari ng(EwvClai mOhis::get InsuranceT ype, nulls LastString Comparator )
  792                                                       .t henCompari ng(EwvClai mOhis::get CobSubmitt edCharges,  nullsLast StringComp arator)
  793                                                       .t henCompari ng(EwvClai mOhis::get CobTotalAl lowedAmt,  nullsLastS tringCompa rator)
  794                                                       .t henCompari ng(EwvClai mOhis::get CobApprove dAmt, null sLastStrin gComparato r)
  795                                                       .t henCompari ng(EwvClai mOhis::get CobTotalNo ncoveredAm t, nullsLa stStringCo mparator)
  796                                                       .t henCompari ng(EwvClai mOhis::get CobPayerPa idAmt, nul lsLastStri ngComparat or)
  797                                                       .t henCompari ng(EwvClai mOhis::get CobTotalDe niedAmt, n ullsLastSt ringCompar ator)
  798                                                       .t henCompari ng(EwvClai mOhis::get CobTotalMe dicarePaid Amt, nulls LastString Comparator )
  799                                                       .t henCompari ng(EwvClai mOhis::get CobPatient PaidAmt, n ullsLastSt ringCompar ator)
  800                                                       .t henCompari ng(EwvClai mOhis::get CobMedicar ePaidAmt10 0, nullsLa stStringCo mparator)
  801                                                       .t henCompari ng(EwvClai mOhis::get CobPatient Responsibi lity, null sLastStrin gComparato r)
  802                                                       .t henCompari ng(EwvClai mOhis::get CobMedicar ePaidAmt80 , nullsLas tStringCom parator)
  803                                                       .t henCompari ng(EwvClai mOhis::get CobMedicar eATrustFun d, nullsLa stStringCo mparator)
  804                                                       .t henCompari ng(EwvClai mOhis::get CobMedicar eBTrustFun d, nullsLa stStringCo mparator)
  805                                                       .t henCompari ng(EwvClai mOhis::get InpCovered Days, null sLastStrin gComparato r)
  806                                                       .t henCompari ng(EwvClai mOhis::get InpLifetim eReserveDa ys, nullsL astStringC omparator)
  807                                                       .t henCompari ng(EwvClai mOhis::get InpLifetim ePsychiatr icDays, nu llsLastStr ingCompara tor)
  808                                                       .t henCompari ng(EwvClai mOhis::get InpClaimDr gAmt, null sLastStrin gComparato r)
  809                                                       .t henCompari ng(EwvClai mOhis::get InpClaimDi sproporSha re, nullsL astStringC omparator)
  810                                                       .t henCompari ng(EwvClai mOhis::get InpMspPass ThroughAmt , nullsLas tStringCom parator)
  811                                                       .t henCompari ng(EwvClai mOhis::get InpClaimPp sCapitalAm t, nullsLa stStringCo mparator)
  812                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talFspDrgA mt, nullsL astStringC omparator)
  813                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talHspDrgA mt, nullsL astStringC omparator)
  814                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talDshDrgA mt, nullsL astStringC omparator)
  815                                                       .t henCompari ng(EwvClai mOhis::get InpOldCapi talAmt, nu llsLastStr ingCompara tor)
  816                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talImeAmt,  nullsLast StringComp arator)
  817                                                       .t henCompari ng(EwvClai mOhis::get InpPpsOper HospSpecDr gAmt, null sLastStrin gComparato r)
  818                                                       .t henCompari ng(EwvClai mOhis::get InpPpsOper FedSpecDrg Amt, nulls LastString Comparator )
  819                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talOutlrAm t, nullsLa stStringCo mparator)
  820                                                       .t henCompari ng(EwvClai mOhis::get InpClaimIn directTeac hAmt, null sLastStrin gComparato r)
  821                                                       .t henCompari ng(EwvClai mOhis::get InpNonpaya bleProfCom ponent, nu llsLastStr ingCompara tor)
  822                                                       .t henCompari ng(EwvClai mOhis::get InpPpsCapi talExcepti onAmt, nul lsLastStri ngComparat or)
  823                                                       .t henCompari ng(EwvClai mOhis::get InpCostRep ortDayCoun t, nullsLa stStringCo mparator)
  824                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkC ode1, null sLastStrin gComparato r)
  825                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkD esc1, null sLastStrin gComparato r)
  826                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkC ode2, null sLastStrin gComparato r)
  827                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkD esc2, null sLastStrin gComparato r)
  828                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkC ode3, null sLastStrin gComparato r)
  829                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkD esc3, null sLastStrin gComparato r)
  830                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkC ode4, null sLastStrin gComparato r)
  831                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkD esc4, null sLastStrin gComparato r)
  832                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkC ode5, null sLastStrin gComparato r)
  833                                                       .t henCompari ng(EwvClai mOhis::get InpRemitta nceRemarkD esc5, null sLastStrin gComparato r)
  834                                                       .t henCompari ng(EwvClai mOhis::get OptReimbur sementRate , nullsLas tStringCom parator)
  835                                                       .t henCompari ng(EwvClai mOhis::get OptEsrdPai dAmt, null sLastStrin gComparato r)
  836                                                       .t henCompari ng(EwvClai mOhis::get OptClaimHc pcsPayable Amt, nulls LastString Comparator )
  837                                                       .t henCompari ng(EwvClai mOhis::get OptNonpaya bleProfCom ponent, nu llsLastStr ingCompara tor)
  838                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkC ode1, null sLastStrin gComparato r)
  839                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkD esc1, null sLastStrin gComparato r)
  840                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkC ode2, null sLastStrin gComparato r)
  841                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkD esc2, null sLastStrin gComparato r)
  842                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkC ode3, null sLastStrin gComparato r)
  843                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkD esc3, null sLastStrin gComparato r)
  844                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkC ode4, null sLastStrin gComparato r)
  845                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkD esc4, null sLastStrin gComparato r)
  846                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkC ode5, null sLastStrin gComparato r)
  847                                                       .t henCompari ng(EwvClai mOhis::get OptRemitta nceRemarkD esc5, null sLastStrin gComparato r)
  848   //                                                           .the nComparing (EwvClaimO his::getew vClaims, n ullsLastEw vClaimsCom parator)
  849   //                                                           .the nComparing (EwvClaimO his::getEw vClaimLeve lAdjustmen tses, null sLastEwvCl aimLevelAd justmentsC omparator)
  850                                                       .t henCompari ng(EwvClai mOhis::get Guid, null sLastBigDe cimalCompa rator)
  851                                      )
  852                                      );
  853           }
  854  
  855  
  856           /* *
  857            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvSvcLine DmeList(go v.va.med.d omain.ewv. EwvService Lines)}.
  858            * /
  859           @T est
  860           pu blic void  testGetEwv SvcLineDme List() {
  861   //               publ ic static  final Comp arator<Ewv SvcLineDme > nullsLas tEwvSvcLin eDmeCompar ator =
  862   //                                 Comparat or.nullsLa st(Compara tor
  863   //                                 .compari ng(EwvSvcL ineDme::ge tDmeLength MedicalNec essity, nu llsLastStr ingCompara tor)
  864   //                                 .thenCom paring(Ewv SvcLineDme ::getDmeFr equency, n ullsLastSt ringCompar ator)
  865   //                                 .thenCom paring(Ewv SvcLineDme ::getDmeRe ntalAmt, n ullsLastSt ringCompar ator)
  866   //                                 .thenCom paring(Ewv SvcLineDme ::getDmePu rchaseAmt,  nullsLast StringComp arator)
  867   //                                 .thenCom paring(Ewv SvcLineDme ::getGuid,  nullsLast BigDecimal Comparator )
  868   ////                               .thenCom paring(Ewv SvcLineDme ::getEwvSe rviceLines ;       //  parent ba ck-link
  869   //                                 );
  870                    test GetList_nu lls(
  871                                      EwvServi ceLines::n ew,
  872                                      EwvServi ceLines::s etEwvSvcLi neDmes,
  873                                      EwvNulls LastSorted List::getE wvSvcLineD meList
  874                                      );
  875                    EwvS erviceLine s obj = ne w EwvServi ceLines();
  876                    
  877                    Set< EwvSvcLine Dme> testS et = new H ashSet<Ewv SvcLineDme >();
  878                    List <EwvSvcLin eDme> list  = null;
  879  
  880                    Set< EwvSvcLine Dme> data1 Set = genD ate_LocalD ateString_ String_Big Decimal(
  881                                      EwvSvcLi neDme::new ,
  882                                      EwvSvcLi neDme::set DmeLengthM edicalNece ssity,
  883                                      EwvSvcLi neDme::set DmeFrequen cy,
  884                                      EwvSvcLi neDme::set Guid,
  885                                      Stream.o f(data1)
  886                                      );
  887  
  888                    test Set.addAll (data1Set) ;
  889                    
  890                    EwvS vcLineDme  it = null;
  891  
  892                    // G enerate so me data
  893                    // A  Set is in  "random"  order so w e probably  don't hav e to shuff le the lis t
  894                    Set< EwvSvcLine Dme> binar yChoiceSet  = new Has hSet<EwvSv cLineDme>( ); 
  895  
  896                    for(  String dd  : "01|17" .split("\\ |")) {
  897                             for( S tring mm :  "03|10".s plit("\\|" )) {
  898                                      for (Str ing yyyy :  "2003|201 8".split(" \\|")) {
  899                                               String dat e = String .join("/",  mm, dd, y yyy);
  900                                               for(String  code : "P C|CP".spli t("\\|"))  {
  901                                                       fo r(String l n : "3|7". split("\\| ")) {
  902                                                                long  lineNo =  Long.parse Long(ln);
  903  
  904                                                                it =  new EwvSv cLineDme() ;
  905                                                                it.s etDmeLengt hMedicalNe cessity(da te);
  906                                                                it.s etDmeFrequ ency(code) ;
  907                                                                it.s etGuid(new  BigDecima l(lineNo *  0.1));
  908                                                                bina ryChoiceSe t.add(it);
  909  
  910                                                       }
  911                                               }
  912                                      }
  913                             }
  914                    }
  915  
  916                    test Set.addAll (binaryCho iceSet);
  917  
  918                    // S et the tes t case
  919                    obj. setEwvSvcL ineDmes(te stSet);
  920  
  921                    // D o the oper ation
  922                    list  = getEwvS vcLineDmeL ist(obj);
  923  
  924                    // C heck the r esult
  925                    // W e need to  compare ea ch element  with the  next eleme nt.
  926                    // B ut it's ea sier to co mpare with  the previ ous elemen t.
  927                    //
  928                    Comp arator<Ewv SvcLineDme > compEwvS erviceLine s = Compar ator.nulls Last(Compa rator
  929                                      .compari ng(EwvSvcL ineDme::ge tDmeLength MedicalNec essity, nu llsLastStr ingCompara tor)
  930                                      .thenCom paring(Ewv SvcLineDme ::getDmeFr equency, n ullsLastSt ringCompar ator)
  931                                      .thenCom paring(Ewv SvcLineDme ::getDmeRe ntalAmt, n ullsLastSt ringCompar ator)
  932                                      .thenCom paring(Ewv SvcLineDme ::getDmePu rchaseAmt,  nullsLast StringComp arator)
  933                                      .thenCom paring(Ewv SvcLineDme ::getGuid,  nullsLast BigDecimal Comparator )
  934                                      );
  935                    test List(list,  (prev, cu rr) -> {re turn compE wvServiceL ines.compa re(prev, c urr) < 0;} );
  936  
  937                    // D O it again  using gen eric funct ion!
  938                    // L ocalDate i s still a  string, so  it's OK!
  939                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  940                                      EwvServi ceLines::n ew,
  941                                      EwvServi ceLines::s etEwvSvcLi neDmes,
  942                                      EwvNulls LastSorted List::getE wvSvcLineD meList,
  943                                      EwvSvcLi neDme::new ,
  944                                      EwvSvcLi neDme::set DmeLengthM edicalNece ssity,
  945                                      EwvSvcLi neDme::set DmeFrequen cy,
  946                                      EwvSvcLi neDme::set Guid,
  947                                      Stream.o f(data1),
  948                                      Comparat or.nullsLa st(Compara tor
  949                                                       .c omparing(E wvSvcLineD me::getDme LengthMedi calNecessi ty, nullsL astStringC omparator)
  950                                                       .t henCompari ng(EwvSvcL ineDme::ge tDmeFreque ncy, nulls LastString Comparator )
  951                                                       .t henCompari ng(EwvSvcL ineDme::ge tDmeRental Amt, nulls LastString Comparator )
  952                                                       .t henCompari ng(EwvSvcL ineDme::ge tDmePurcha seAmt, nul lsLastStri ngComparat or)
  953                                                       .t henCompari ng(EwvSvcL ineDme::ge tGuid, nul lsLastBigD ecimalComp arator)
  954                                      )
  955                                      );
  956  
  957   }
  958  
  959           /* *
  960            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvSlProvi derList(go v.va.med.d omain.ewv. EwvService Lines)}.
  961            * /
  962           @T est
  963           pu blic void  testGetEwv SlProvider List() {
  964                    test GetList_nu lls(
  965                                      EwvServi ceLines::n ew,
  966                                      EwvServi ceLines::s etEwvSlPro viders,
  967                                      EwvNulls LastSorted List::getE wvSlProvid erList
  968                                      );
  969  
  970                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  971                                      EwvServi ceLines::n ew,
  972                                      EwvServi ceLines::s etEwvSlPro viders,
  973                                      EwvNulls LastSorted List::getE wvSlProvid erList,
  974                                      EwvSlPro vider::new ,
  975                                      EwvSlPro vider::set ProviderTy pe,
  976                                      EwvSlPro vider::set ProviderId ,
  977                                      EwvSlPro vider::set Guid,
  978                                      Stream.o f(data1),
  979                                      Comparat or.nullsLa st(Compara tor
  980                                                       .c omparing(E wvSlProvid er::getPro viderType,  nullsLast StringComp arator)    // test th is
  981                                                       .t henCompari ng(EwvSlPr ovider::ge tProviderI d, nullsLa stStringCo mparator)  // test th is
  982                                                       .t henCompari ng(EwvSlPr ovider::ge tProviderL name, null sLastStrin gComparato r)      //  skip...
  983                                                       .t henCompari ng(EwvSlPr ovider::ge tProviderF name, null sLastStrin gComparato r)
  984                                                       .t henCompari ng(EwvSlPr ovider::ge tProviderN pi5010, nu llsLastStr ingCompara tor)
  985                                                       .t henCompari ng(EwvSlPr ovider::ge tPostalCod e5010, nul lsLastStri ngComparat or)
  986                                                       .t henCompari ng(EwvSlPr ovider::ge tProviderM name, null sLastStrin gComparato r)
  987                                                       .t henCompari ng(EwvSlPr ovider::ge tTaxonomyC ode, nulls LastString Comparator )
  988                                                       .t henCompari ng(EwvSlPr ovider::ge tGuid, nul lsLastBigD ecimalComp arator)    // test th is
  989                                      )
  990                                      );
  991           }
  992  
  993           /* *
  994            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvService LineOhisLi st(gov.va. med.domain .ewv.EwvSe rviceLines )}.
  995            * /
  996           @T est
  997           pu blic void  testGetEwv ServiceLin eOhisList( ) {
  998                    test GetList_nu lls(
  999                                      EwvServi ceLines::n ew, 
  1000                                      EwvServi ceLines::s etEwvServi ceLineOhis es,
  1001                                      EwvNulls LastSorted List::getE wvServiceL ineOhisLis t
  1002                                      );
  1003  
  1004                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  1005                                      EwvServi ceLines::n ew,
  1006                                      EwvServi ceLines::s etEwvServi ceLineOhis es,
  1007                                      EwvNulls LastSorted List::getE wvServiceL ineOhisLis t,
  1008                                      EwvServi ceLineOhis ::new,
  1009                                      EwvServi ceLineOhis ::setOhiAd judicatedD ate,
  1010                                      EwvServi ceLineOhis ::setProce dureCode,
  1011                                      EwvServi ceLineOhis ::setGuid,
  1012                                      Stream.o f(data1),
  1013                                      Comparat or.nullsLa st(Compara tor
  1014                                                       .c omparing(E wvServiceL ineOhis::g etOhiAdjud icatedDate , NullsLas tComparato r.nullsLas tLocalDate StringComp arator)
  1015                                                       .t henCompari ng(EwvServ iceLineOhi s::getProc edureCode,  nullsLast StringComp arator)
  1016                                                       .t henCompari ng(EwvServ iceLineOhi s::getReve nueCode, n ullsLastSt ringCompar ator)
  1017                                                       .t henCompari ng(EwvServ iceLineOhi s::getAdju dicated, n ullsLastSt ringCompar ator)
  1018                                                       .t henCompari ng(EwvServ iceLineOhi s::getModi fier1, nul lsLastStri ngComparat or)
  1019                                                       .t henCompari ng(EwvServ iceLineOhi s::getModi fier2, nul lsLastStri ngComparat or)
  1020                                                       .t henCompari ng(EwvServ iceLineOhi s::getModi fier3, nul lsLastStri ngComparat or)
  1021                                                       .t henCompari ng(EwvServ iceLineOhi s::getModi fier4, nul lsLastStri ngComparat or)
  1022                                                       .t henCompari ng(EwvServ iceLineOhi s::getPaye rId, nulls LastString Comparator )
  1023                                                       .t henCompari ng(EwvServ iceLineOhi s::getGuid , nullsLas tBigDecima lComparato r)
  1024   //                                                  .t henCompari ng(EwvServ iceLineOhi s::getEwvS erviceLine s, EwvServ iceLines:: compareTo)  // No!
  1025                                      )
  1026                                      );
  1027           }
  1028  
  1029           /* *
  1030            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvSvcLine TeethList( gov.va.med .domain.ew v.EwvServi ceLines)}.
  1031            * /
  1032           @T est
  1033           pu blic void  testGetEwv SvcLineTee thList() {
  1034                    test GetList_nu lls(
  1035                                      EwvServi ceLines::n ew, 
  1036                                      EwvServi ceLines::s etEwvSvcLi neTeeths,
  1037                                      EwvNulls LastSorted List::getE wvSvcLineT eethList
  1038                                      );
  1039                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  1040                                      EwvServi ceLines::n ew,
  1041                                      EwvServi ceLines::s etEwvSvcLi neTeeths,
  1042                                      EwvNulls LastSorted List::getE wvSvcLineT eethList,
  1043                                      EwvSvcLi neTeeth::n ew,
  1044                                      EwvSvcLi neTeeth::s etToothNum ber,
  1045                                      EwvSvcLi neTeeth::s etSurface1 ,
  1046                                      EwvSvcLi neTeeth::s etGuid,
  1047                                      Stream.o f(data1),
  1048                                      Comparat or.nullsLa st(Compara tor
  1049                                                       .c omparing(E wvSvcLineT eeth::getT oothNumber , nullsLas tStringCom parator)
  1050                                                       .t henCompari ng(EwvSvcL ineTeeth:: getSurface 1, nullsLa stStringCo mparator)
  1051                                                       .t henCompari ng(EwvSvcL ineTeeth:: getSurface 2, nullsLa stStringCo mparator)
  1052                                                       .t henCompari ng(EwvSvcL ineTeeth:: getSurface 3, nullsLa stStringCo mparator)
  1053                                                       .t henCompari ng(EwvSvcL ineTeeth:: getSurface 4, nullsLa stStringCo mparator)
  1054                                                       .t henCompari ng(EwvSvcL ineTeeth:: getSurface 5, nullsLa stStringCo mparator)
  1055                                                       .t henCompari ng(EwvSvcL ineTeeth:: getGuid, n ullsLastBi gDecimalCo mparator)
  1056   //                                                           .the nComparing (EwvSvcLin eTeeth::ge tEwvServic eLines;      // paren t back-lin k
  1057                                      )
  1058                                      );
  1059                    }
  1060  
  1061           /* *
  1062            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvAmbulan ceInfo5010 List(gov.v a.med.doma in.ewv.Ewv ServiceLin es)}.
  1063            * /
  1064           @T est
  1065           pu blic void  testGetEwv AmbulanceI nfo5010Lis t() {
  1066                    test GetList_nu lls(
  1067                                      EwvServi ceLines::n ew, 
  1068                                      EwvServi ceLines::s etEwvAmbul anceInfo50 10s,
  1069                                      EwvNulls LastSorted List::getE wvAmbulanc eInfo5010L ist
  1070                                      );
  1071                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  1072                                      EwvServi ceLines::n ew,
  1073                                      EwvServi ceLines::s etEwvAmbul anceInfo50 10s,
  1074                                      EwvNulls LastSorted List::getE wvAmbulanc eInfo5010L ist,
  1075                                      EwvAmbul anceInfo50 10::new,
  1076                                      EwvAmbul anceInfo50 10::setPic kupAddress Line1,
  1077                                      EwvAmbul anceInfo50 10::setPic kupAddress Line2,
  1078                                      EwvAmbul anceInfo50 10::setGui d,
  1079                                      Stream.o f(data1),
  1080                                      Comparat or.nullsLa st(Compara tor
  1081                                                       .c omparing(E wvAmbulanc eInfo5010: :getPickup AddressLin e1, nullsL astStringC omparator)
  1082                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getPi ckupAddres sLine2, nu llsLastStr ingCompara tor)
  1083                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getPi ckupCity,  nullsLastS tringCompa rator)
  1084                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getPi ckupState,  nullsLast StringComp arator)
  1085                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getPi ckupZip, n ullsLastSt ringCompar ator)
  1086                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getDr opoffAddre ssLine1, n ullsLastSt ringCompar ator)
  1087                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getDr opoffAddre ssLine2, n ullsLastSt ringCompar ator)
  1088                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getDr opoffCity,  nullsLast StringComp arator)
  1089                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getDr opoffState , nullsLas tStringCom parator)
  1090                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getDr opoffZip,  nullsLastS tringCompa rator)
  1091                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getTr ansportRea sonCode, n ullsLastSt ringCompar ator)
  1092                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getTr ansportDis tance, nul lsLastStri ngComparat or)
  1093                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getRo undTripPur pose, null sLastStrin gComparato r)
  1094                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getSt retcherPur pose, null sLastStrin gComparato r)
  1095                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCe rtIndicato r1, nullsL astStringC omparator)
  1096                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e11, nulls LastString Comparator )
  1097                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e12, nulls LastString Comparator )
  1098                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e13, nulls LastString Comparator )
  1099                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e14, nulls LastString Comparator )
  1100                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e15, nulls LastString Comparator )
  1101                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCe rtIndicato r2, nullsL astStringC omparator)
  1102                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e21, nulls LastString Comparator )
  1103                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e22, nulls LastString Comparator )
  1104                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e23, nulls LastString Comparator )
  1105                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e24, nulls LastString Comparator )
  1106                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e25, nulls LastString Comparator )
  1107                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCe rtIndicato r3, nullsL astStringC omparator)
  1108                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e31, nulls LastString Comparator )
  1109                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e32, nulls LastString Comparator )
  1110                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e33, nulls LastString Comparator )
  1111                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e34, nulls LastString Comparator )
  1112                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getCo nditionCod e35, nulls LastString Comparator )
  1113                                                       .t henCompari ng(EwvAmbu lanceInfo5 010::getGu id, nullsL astBigDeci malCompara tor)
  1114                                      )
  1115                                      );
  1116  
  1117           }
  1118  
  1119           /* *
  1120            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvService LinesDrugs List(gov.v a.med.doma in.ewv.Ewv ServiceLin es)}.
  1121            * /
  1122           @I gnore
  1123           @T est
  1124           pu blic void  testGetEwv ServiceLin esDrugsLis t() {
  1125                    test GetList_nu lls(
  1126                                      EwvServi ceLines::n ew, 
  1127                                      EwvServi ceLines::s etEwvServi ceLinesDru gses,
  1128                                      EwvNulls LastSorted List::getE wvServiceL inesDrugsL ist
  1129                                      );
  1130  
  1131                    test Set_GetLis tSSS(
  1132                                      EwvServi ceLines::n ew,
  1133                                      EwvServi ceLines::s etEwvServi ceLinesDru gses,
  1134                                      EwvNulls LastSorted List::getE wvServiceL inesDrugsL ist,
  1135                                      EwvServi ceLinesDru gs::new,
  1136                                      EwvServi ceLinesDru gs::setDru gRx,
  1137                                      EwvServi ceLinesDru gs::setDru gRxNdcCode ,
  1138                                      EwvServi ceLinesDru gs::setDru gRxCategor y5010,
  1139                                      Stream.o f(data1),
  1140                                      Comparat or.nullsLa st(Compara tor
  1141                                                       .c omparing(E wvServiceL inesDrugs: :getDrugRx , nullsLas tStringCom parator)
  1142                                                       .t henCompari ng(EwvServ iceLinesDr ugs::getDr ugRxNdcCod e, nullsLa stStringCo mparator)
  1143                                                       .t henCompari ng(EwvServ iceLinesDr ugs::getDr ugRxQuanti ty, nullsL astStringC omparator)
  1144                                                       .t henCompari ng(EwvServ iceLinesDr ugs::getDr ugRxType,  nullsLastS tringCompa rator)
  1145                                                       .t henCompari ng(EwvServ iceLinesDr ugs::getDr ugRxCharge , nullsLas tStringCom parator)
  1146                                                       .t henCompari ng(EwvServ iceLinesDr ugs::getDr ugRxCatego ry5010, nu llsLastStr ingCompara tor)
  1147   //                                                  .t henCompari ng(EwvServ iceLinesDr ugs::getEw vServiceLi nes;         // paren t back-lin k
  1148                                      )
  1149                                      );
  1150           }
  1151  
  1152           /* *
  1153            *  Test meth od for {@l ink gov.va .med.ewv.u til.EwvNul lsLastSort edList#get EwvService LineOhiAdj tmtsList(g ov.va.med. domain.ewv .EwvServic eLineOhis) }.
  1154            * /
  1155           @T est
  1156           pu blic void  testGetEwv ServiceLin eOhiAdjtmt sList() {
  1157                    test GetList_nu lls(
  1158                                      EwvServi ceLineOhis ::new,
  1159                                      EwvServi ceLineOhis ::setEwvSe rviceLineO hiAdjtmtse s,
  1160                                      EwvNulls LastSorted List::getE wvServiceL ineOhiAdjt mtsList
  1161                                      );
  1162  
  1163                    test Set_GetLis t_LocalDat eString_St ring_BigDe cimal(
  1164                                      EwvServi ceLineOhis ::new,
  1165                                      EwvServi ceLineOhis ::setEwvSe rviceLineO hiAdjtmtse s,
  1166                                      EwvNulls LastSorted List::getE wvServiceL ineOhiAdjt mtsList,
  1167                                      EwvServi ceLineOhiA djtmts::ne w,
  1168                                      EwvServi ceLineOhiA djtmts::se tPrimaryPa yerId,
  1169                                      EwvServi ceLineOhiA djtmts::se tSvcLineAd justmtReas onCode,
  1170                                      EwvServi ceLineOhiA djtmts::se tGuid,
  1171                                      Stream.o f(data1),
  1172                                      Comparat or.nullsLa st(Compara tor
  1173                                                       .c omparing(E wvServiceL ineOhiAdjt mts::getPr imaryPayer Id, nullsL astStringC omparator)
  1174                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etSvcLineA djustmtRea sonCode, n ullsLastSt ringCompar ator)
  1175                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etDescript ion, nulls LastString Comparator )
  1176                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etQuantity , nullsLas tStringCom parator)
  1177                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etCoAmt, n ullsLastSt ringCompar ator)
  1178                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etOaAmt, n ullsLastSt ringCompar ator)
  1179                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etPiAmt, n ullsLastSt ringCompar ator)
  1180                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etPrAmt, n ullsLastSt ringCompar ator)
  1181                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etPrAmt, n ullsLastSt ringCompar ator)
  1182                                                       .t henCompari ng(EwvServ iceLineOhi Adjtmts::g etGuid, nu llsLastBig DecimalCom parator)
  1183                                      )
  1184                                      );
  1185           }
  1186  
  1187   }