84. EPMO Open Source Coordination Office Redaction File Detail Report

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

84.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CacheWeb\test\gov\va\med\cache\gui\server ImagingCacheManagementServiceImplTest.java Mon Dec 4 21:34:18 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CacheWeb\test\gov\va\med\cache\gui\server ImagingCacheManagementServiceImplTest.java Mon Dec 4 21:58:06 2017 UTC

84.2 Comparison summary

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

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

84.4 Active regular expressions

No regular expressions were active.

84.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.c ache.gui.s erver;
  5  
  6   import sta tic org.ju nit.Assert .assertEqu als;
  7   import sta tic org.ju nit.Assert .assertNot Null;
  8   import sta tic org.ju nit.Assert .assertNul l;
  9   import sta tic org.ju nit.Assert .assertTru e;
  10   import sta tic org.ju nit.Assert .fail;
  11   import gov .va.med.ca che.gui.cl ient.Cache DataProvid er;
  12   import gov .va.med.ca che.gui.sh ared.Abstr actNamedVO ;
  13   import gov .va.med.ca che.gui.sh ared.CACHE _POPULATIO N_DEPTH;
  14   import gov .va.med.ca che.gui.sh ared.Cache ItemPath;
  15   import gov .va.med.ca che.gui.sh ared.Cache ManagerVO;
  16   import gov .va.med.ca che.gui.sh ared.Cache VO;
  17   import gov .va.med.ca che.gui.sh ared.Group VO;
  18   import gov .va.med.ca che.gui.sh ared.Merge Exception;
  19   import gov .va.med.ca che.gui.sh ared.Regio nVO;
  20   import gov .va.med.im aging.stor age.cache. impl.Cache ManagerImp l;
  21  
  22   import jav ax.naming. InitialCon text;
  23   import jav ax.naming. NamingExce ption;
  24  
  25   import org .apache.lo gging.log4 j.LogManag er;
  26   import org .apache.lo gging.log4 j.Logger;
  27   import org .junit.Bef ore;
  28   import org .junit.Tes t;
  29  
  30   /**
  31    * @author         
BECKEC
  32    *
  33    */
  34   public cla ss Imaging CacheManag ementServi ceImplTest
  35   {
  36           pr ivate Imag ingCacheMa nagementSe rviceImpl  serviceImp l;
  37           pr otected Lo gger logge r = LogMan ager.getLo gger(this. getClass() );
  38           /* *
  39            *  @throws j ava.lang.E xception
  40            * /
  41           @B efore
  42           pu blic void  setUp()
  43           {
  44                    Cach eManagerIm pl cacheMa nager = nu ll;
  45                    try
  46                    {
  47                             cacheM anager = C acheManage rImpl.getS ingleton() ;
  48                    }
  49                    catc h (Excepti on e1)
  50                    {
  51                             e1.pri ntStackTra ce();
  52                    }
  53                    
  54   //               Init ialContext  initialCt x = null;
  55   //               
  56   //               logg er.info("O btaining I nitialCont ext");
  57   //               try
  58   //               {
  59   //                        initia lCtx = new  InitialCo ntext();
  60   //               }
  61   //               catc h (NamingE xception e )
  62   //               {
  63   //                        e.prin tStackTrac e();
  64   //                        fail() ;
  65   //               }
  66   //               
  67   //               logg er.info("I nitialCont ext is " +  (initialC tx != null  ? "NOT NU LL" : "NUL L") + ", l ooking up  " + Imagin gCacheMana gementServ iceImpl.JN DI_CONTEXT  + "/" + I magingCach eManagemen tServiceIm pl.JNDI_CA CHE_MANAGE R_NAME);
  68   //               //Co ntext envC tx = (Cont ext) initi alCtx.look up(Imaging CacheManag ementServi ceImpl.CON TEXT);
  69   //               try
  70   //               {
  71   //                        initia lCtx.looku p(ImagingC acheManage mentServic eImpl.JNDI _CONTEXT +  "/" + Ima gingCacheM anagementS erviceImpl .JNDI_CACH E_MANAGER_ NAME);
  72   //                        logger .info(Imag ingCacheMa nagementSe rviceImpl. JNDI_CONTE XT + "/" +  ImagingCa cheManagem entService Impl.JNDI_ CACHE_MANA GER_NAME +  " exists,  not bindi ng.");
  73   //                        initia lCtx.rebin d(
  74   //                                 ImagingC acheManage mentServic eImpl.JNDI _CONTEXT +  "/" + Ima gingCacheM anagementS erviceImpl .JNDI_CACH E_MANAGER_ NAME,
  75   //                                 cacheMan ager
  76   //                        );
  77   //                        logger .info( cac heManager. toString()  + " rebou nd to " +  ImagingCac heManageme ntServiceI mpl.JNDI_C ONTEXT + " /" + Imagi ngCacheMan agementSer viceImpl.J NDI_CACHE_ MANAGER_NA ME);
  78   //               }
  79   //               catc h(NamingEx ception nX )
  80   //               {
  81   //                        logger .info(Imag ingCacheMa nagementSe rviceImpl. JNDI_CONTE XT + "/" +  ImagingCa cheManagem entService Impl.JNDI_ CACHE_MANA GER_NAME +  " does no t exist, b inding.");
  82   //                        
  83   //                        try
  84   //                        {
  85   //                                 initialC tx.bind(
  86   //                                          ImagingCac heManageme ntServiceI mpl.JNDI_C ONTEXT + " /" + Imagi ngCacheMan agementSer viceImpl.J NDI_CACHE_ MANAGER_NA ME,
  87   //                                          cacheManag er
  88   //                                 );
  89   //                                 logger.i nfo( Cache ManagerImp l.getSingl eton().toS tring() +  " bound to  " + Imagi ngCacheMan agementSer viceImpl.J NDI_CONTEX T + "/" +  ImagingCac heManageme ntServiceI mpl.JNDI_C ACHE_MANAG ER_NAME);
  90   //                        }
  91   //                        catch  (Exception  e)
  92   //                        {
  93   //                                 e.printS tackTrace( );
  94   //                                 fail();
  95   //                        }
  96   //               }
  97                    
  98                    serv iceImpl =  new Imagin gCacheMana gementServ iceImpl();
  99           }
  100  
  101           /* *
  102            *  Test meth od for {@l ink gov.va .med.cache .gui.serve r.ImagingC acheManage mentServic eImpl#getC acheManage rVO()}.
  103            * /
  104           @T est
  105           pu blic void  testGetCac heManagerV O()
  106           {
  107                    asse rtNotNull(  this.serv iceImpl.ge tCacheMana gerVO() );
  108           }
  109  
  110           /* *
  111            *  Test meth od for {@l ink gov.va .med.cache .gui.serve r.ImagingC acheManage mentServic eImpl#getC acheItems( gov.va.med .cache.gui .shared.Ca cheItemPat h, gov.va. med.cache. gui.shared .CACHE_POP ULATION_DE PTH)}.
  112            * /
  113           @T est
  114           pu blic void  testGetCac heOnly()
  115           {
  116                    Cach eVO result ;
  117                    
  118                    resu lt = this. serviceImp l.getCache Items(new  CacheItemP ath("Imagi ngExchange Cache"), C ACHE_POPUL ATION_DEPT H.CACHE, C ACHE_POPUL ATION_DEPT H.CACHE);
  119                    asse rtNotNull(  result );
  120                    asse rtEquals(0 , result.g etRegionCo unt());
  121  
  122           }
  123  
  124           @T est
  125           pu blic void  testGetCac heAndRegio ns()
  126           {
  127                    Cach eVO result ;
  128                    
  129                    resu lt = this. serviceImp l.getCache Items(new  CacheItemP ath("Imagi ngExchange Cache"), C ACHE_POPUL ATION_DEPT H.REGION,  CACHE_POPU LATION_DEP TH.CACHE);
  130                    asse rtNotNull(  result );
  131                    asse rtEquals(4 , result.g etRegionCo unt());
  132  
  133                    for( RegionVO r egion : re sult.getRe gions())
  134                    {
  135                             assert NotNull(re gion);
  136                             assert NotNull(re gion.getNa me());
  137                             System .out.print ln(region. getName()) ;
  138                    }
  139                    
  140           }
  141           
  142           @T est
  143           pu blic void  testGetCac heRegionsG roups1()
  144           {
  145                    Cach eVO result ;
  146                    
  147                    resu lt = this. serviceImp l.getCache Items(new  CacheItemP ath("Imagi ngExchange Cache"), C ACHE_POPUL ATION_DEPT H.GROUP0,  CACHE_POPU LATION_DEP TH.CACHE);
  148                    asse rtNotNull(  result );
  149  
  150                    bool ean groupF ound = fal se;
  151                    for( RegionVO r egion : re sult.getRe gions())
  152                    {
  153                             assert NotNull(re gion);
  154                             assert NotNull(re gion.getNa me());
  155                             assert NotNull(re gion.getGr oups());
  156                             
  157                             for(Gr oupVO grou p : region .getGroups ())
  158                                      groupFou nd = true;
  159                    }
  160                    
  161                    asse rtTrue(gro upFound);
  162           }
  163           
  164           @T est
  165           pu blic void  testMergeR egions() 
  166           th rows Merge Exception
  167           {
  168                    Cach eVO client Cache;
  169                    Cach eVO client CacheUpdat e;
  170                    
  171                    clie ntCache =  this.servi ceImpl.get CacheItems (new Cache ItemPath(" ImagingExc hangeCache "), CACHE_ POPULATION _DEPTH.CAC HE, CACHE_ POPULATION _DEPTH.CAC HE);
  172                    asse rtNotNull(  clientCac he );
  173  
  174                    clie ntCacheUpd ate = this .serviceIm pl.getCach eItems(new  CacheItem Path("Imag ingExchang eCache"),  CACHE_POPU LATION_DEP TH.REGION,  CACHE_POP ULATION_DE PTH.CACHE) ;
  175                    asse rtNotNull(  clientCac heUpdate ) ;
  176                    
  177                    clie ntCache.me rge(client CacheUpdat e);
  178                    asse rtTrue(cli entCache.g etRegionCo unt() == 4 );
  179                    
  180                    clie ntCacheUpd ate = this .serviceIm pl.getCach eItems(new  CacheItem Path("Imag ingExchang eCache"),  CACHE_POPU LATION_DEP TH.GROUP0,  CACHE_POP ULATION_DE PTH.CACHE) ;
  181                    asse rtNotNull(  clientCac heUpdate ) ;
  182           }
  183  
  184           @T est
  185           pu blic void  testMergeC acheManage r() 
  186           th rows Merge Exception
  187           {
  188                    Cach eManagerVO  cacheMana gerVO = ne w CacheMan agerVO();
  189  
  190                    Cach eVO client Cache = th is.service Impl.getCa cheItems(n ew CacheIt emPath("Im agingExcha ngeCache") , CACHE_PO PULATION_D EPTH.CACHE , CACHE_PO PULATION_D EPTH.CACHE );
  191                    asse rtNotNull(  clientCac he );
  192                    cach eManagerVO .add(clien tCache);
  193                    
  194                    Cach eManagerVO  clientCac heManagerU pdateVO =  new CacheM anagerVO() ;
  195                    Cach eVO client CacheUpdat e = this.s erviceImpl .getCacheI tems(new C acheItemPa th("Imagin gExchangeC ache"), CA CHE_POPULA TION_DEPTH .REGION, C ACHE_POPUL ATION_DEPT H.CACHE);
  196                    asse rtNotNull(  clientCac heUpdate ) ;
  197                    clie ntCacheMan agerUpdate VO.add(cli entCacheUp date);
  198  
  199                    cach eManagerVO .merge(cli entCacheMa nagerUpdat eVO);
  200                    Abst ractNamedV O namedVo  = CacheDat aProvider. followPath (clientCac he, new Ca cheItemPat h("Imaging ExchangeCa che", "va- image-regi on"));
  201                    asse rtEquals(" va-image-r egion", na medVo.getN ame());
  202           }
  203           
  204           @T est
  205           pu blic void  testFollow Path()
  206           {
  207                    Cach eVO client Cache;
  208                    
  209                    clie ntCache =  this.servi ceImpl.get CacheItems (new Cache ItemPath(" ImagingExc hangeCache "), CACHE_ POPULATION _DEPTH.GRO UP0, CACHE _POPULATIO N_DEPTH.CA CHE);
  210                    asse rtNotNull(  clientCac he );
  211  
  212                    Abst ractNamedV O namedVo  = CacheDat aProvider. followPath (clientCac he, new Ca cheItemPat h("Imaging ExchangeCa che", "dod -metadata- region"));
  213                    asse rtNotNull( namedVo);
  214                    asse rtEquals(" dod-metada ta-region" , namedVo. getName()) ;
  215                    
  216                    name dVo = Cach eDataProvi der.follow Path(clien tCache, ne w CacheIte mPath("Ima gingExchan geCache",  "va-image- region"));
  217                    asse rtNotNull( namedVo);
  218                    asse rtEquals(" va-image-r egion", na medVo.getN ame());
  219                    
  220   //               name dVo = Cach eDataProvi der.follow Path(clien tCache, ne w CacheIte mPath("Ima gingExchan geCache",  "va-image- region", " 678"));
  221   //               asse rtNotNull( namedVo);
  222   //               asse rtEquals(" 678", name dVo.getNam e());
  223           }
  224   }