681. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/5/2017 4:26:29 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.

681.1 Files compared

# Location File Last Modified
1 C:\working_scrub\Unredacted\VAP Code Base\VAP_Bld2_Source_Code_CIF_2017-02-14\nvap-server\src\test\java\gov\va\nvap\server\test\endpoint\privacy TestConsentManagementService.java Wed Feb 1 18:37:28 2017 UTC
2 eHX-CIF.zip\eHX-CIF\VAP Code Base\VAP_Bld2_Source_Code_CIF_2017-02-14\nvap-server\src\test\java\gov\va\nvap\server\test\endpoint\privacy TestConsentManagementService.java Mon Apr 3 14:08:37 2017 UTC

681.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 8 264
Changed 7 14
Inserted 0 0
Removed 0 0

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

681.4 Active regular expressions

No regular expressions were active.

681.5 Comparison detail

  1   package go v.va.nvap. server.tes t.endpoint .privacy;
  2  
  3   import gov .va.nvap.c ommon.file .FileUtil;
  4   import gov .va.nvap.p rivacy.Con sentDirect iveAuthori zationRequ est;
  5   import gov .va.nvap.p rivacy.Con sentDirect iveDocumen tRetrieveR equest;
  6   import gov .va.nvap.p rivacy.Con sentDirect iveDocumen tType;
  7   import gov .va.nvap.p rivacy.Con sentDirect iveOptOutR easonType;
  8   import gov .va.nvap.p rivacy.Con sentDirect iveQueryPa ramType;
  9   import gov .va.nvap.p rivacy.Con sentDirect iveQueryRe quest;
  10   import gov .va.nvap.p rivacy.Con sentDirect iveReferen ceType;
  11   import gov .va.nvap.p rivacy.Con sentDirect iveRevocat ionRequest ;
  12   import gov .va.nvap.p rivacy.Con sentType;
  13   import gov .va.nvap.p rivacy.Org anizations QueryReque st;
  14   import gov .va.nvap.p rivacy.Org anizations QueryRespo nse;
  15   import gov .va.nvap.p rivacy.Ser viceConsum er;
  16   import gov .va.nvap.p rivacy.Ser viceConsum erContextT ype;
  17   import gov .va.nvap.s erver.test .common.Ab stractTest Case;
  18   import gov .va.nvap.s ervice.pri vacy.Conse ntManageme ntService;
  19   import gov .va.nvap.s ervice.pri vacy.Conse ntManageme ntServiceE xception;
  20  
  21   import jav a.io.IOExc eption;
  22  
  23   import jav ax.annotat ion.Resour ce;
  24  
  25   import org .junit.Tes t;
  26  
  27   public cla ss TestCon sentManage mentServic e extends  AbstractTe stCase {
  28  
  29           @R esource(na me = "cons entManagem entService ")
  30           Co nsentManag ementServi ce consent Management Service;
  31  
  32           @T est
  33           pu blic void  testAuthor ize() thro ws Consent Management ServiceExc eption,
  34                             IOExce ption {
  35                    fina l org.spri ngframewor k.core.io. Resource r esource =  this.appli cationCont ext
  36                                      .getReso urce("clas spath:gov/ va/nvap/se rver/test/ service/pr ivacy/Samp leCDAConse ntDirectiv eStructure dExcludeOr g.xml");
  37  
  38                    fina l ConsentD irectiveAu thorizatio nRequest r equest = n ew Consent DirectiveA uthorizati onRequest( );
  39                    requ est.setDoc ument(File Util.getRe source(res ource).get Bytes());
  40                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  41                    try  {
  42                    this .consentMa nagementSe rvice
  43                                      .process ConsentDir ectiveAuth orization( request);
  44                    } ca tch (Conse ntManageme ntServiceE xception e x) {
  45                             // Cat ch Active  Consent Di rective Ex ception
  46                    }
  47           }
  48  
  49           pr ivate Serv iceConsume rContextTy pe getServ iceConsume rContext(S tring user Id, String  userFacil ityStation Id) {
  50                    Serv iceConsume rContextTy pe consume rContext =  new Servi ceConsumer ContextTyp e();
  51                    cons umerContex t.setFacil ity(userFa cilityStat ionId);
  52                    cons umerContex t.setConse ntType(Con sentType.N W_HIN_AUTH ORIZATION) ;
  53                    cons umerContex t.setServi ceConsumer Type(Servi ceConsumer .ADMINISTR ATOR_PORTA L);
  54                    cons umerContex t.setUser( userId);
  55                    retu rn consume rContext;
  56           }
  57  
  58           pr ivate Serv iceConsume rContextTy pe getServ iceConsume rContextRe vocation(S tring user Id, String  userFacil ityStation Id) {
  59                    Serv iceConsume rContextTy pe consume rContext =  new Servi ceConsumer ContextTyp e();
  60                    cons umerContex t.setFacil ity(userFa cilityStat ionId);
  61                    cons umerContex t.setConse ntType(Con sentType.N W_HIN_REVO CATION);
  62                    cons umerContex t.setServi ceConsumer Type(Servi ceConsumer .ADMINISTR ATOR_PORTA L);
  63                    cons umerContex t.setUser( userId);
  64                    retu rn consume rContext;
  65           }
  66  
  67  
  68           @T est
  69           pu blic void  testGetAll owedOrgani zations()
  70                             throws  ConsentMa nagementSe rviceExcep tion {
  71                    fina l Organiza tionsQuery Request re quest = ne w Organiza tionsQuery Request();
  72                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  73                    fina l Organiza tionsQuery Response r esponse =  this.conse ntManageme ntService
  74                                      .getOrga nizations( request);
  75                    resp onse.getOr ganization ();
  76           }
  77  
  78           @T est
  79           pu blic void  testQueryC onsentDire ctiveActiv e()
  80                             throws  ConsentMa nagementSe rviceExcep tion, IOEx ception {
  81  
  82                    fina l ConsentD irectiveQu eryRequest  request =  new Conse ntDirectiv eQueryRequ est();
  83                    requ est.setPat ientId("11 1111");
  84                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  85                    requ est.setQue ryParam(Co nsentDirec tiveQueryP aramType.A CTIVE);
  86                    this .consentMa nagementSe rvice.getC onsentDire ctives(req uest);
  87           }
  88  
  89           @T est
  90           pu blic void  testQueryC onsentDire ctiveAll()
  91                             throws  ConsentMa nagementSe rviceExcep tion, IOEx ception {
  92  
  93                    fina l ConsentD irectiveQu eryRequest  request =  new Conse ntDirectiv eQueryRequ est();
  94                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  95                    requ est.setPat ientId("11 1111");
  96                    this .consentMa nagementSe rvice.getC onsentDire ctives(req uest);
  97           }
  98  
  99           @T est
  100           pu blic void  testRetrie veConsentD irective()
  101                             throws  ConsentMa nagementSe rviceExcep tion, IOEx ception {
  102  
  103                    fina l ConsentD irectiveDo cumentRetr ieveReques t request  = new Cons entDirecti veDocument RetrieveRe quest();
  104                    fina l ConsentD irectiveRe ferenceTyp e directiv e = new Co nsentDirec tiveRefere nceType();
  105                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  106                    dire ctive.setC onsentDirI d("99999") ;
  107                    requ est.setCon sentDirect iveReferen ce(directi ve);
  108  
  109                    this .consentMa nagementSe rvice.getC onsentDire ctiveDocum ents(reque st);
  110           }
  111  
  112           @T est
  113           pu blic void  testRetrie veConsentD irectiveWi thOptIn()
  114                             throws  ConsentMa nagementSe rviceExcep tion, IOEx ception {
  115  
  116                    fina l ConsentD irectiveDo cumentRetr ieveReques t request  = new Cons entDirecti veDocument RetrieveRe quest();
  117                    fina l ConsentD irectiveRe ferenceTyp e directiv e = new Co nsentDirec tiveRefere nceType();
  118                    dire ctive.setC onsentDirI d("99999") ;
  119                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContext( "         TEST", "98 3"));
  120                    requ est.setCon sentDirect iveReferen ce(directi ve);
  121                    requ est.setDoc umentType( ConsentDir ectiveDocu mentType.A UTHORIZE);
  122                    this .consentMa nagementSe rvice.getC onsentDire ctiveDocum ents(reque st);
  123           }
  124  
  125           @T est
  126           pu blic void  testRevoke () throws  ConsentMan agementSer viceExcept ion,
  127                             IOExce ption {
  128                    fina l org.spri ngframewor k.core.io. Resource r esource =  this.appli cationCont ext
  129                                      .getReso urce("clas spath:gov/ va/nvap/se rver/test/ service/pr ivacy/Samp leCDAConse ntDirectiv eStructure dExcludeOr g-Revoke.x ml");
  130  
  131                    fina l ConsentD irectiveRe vocationRe quest requ est = new  ConsentDir ectiveRevo cationRequ est();
  132                    requ est.setDoc ument(File Util.getRe source(res ource).get Bytes());
  133                     request.se tServiceCo nsumerCont ext(getSer viceConsum erContextR evocation( "         TEST", "98 3"));
  134                    requ est.setOpt outReason( ConsentDir ectiveOptO utReasonTy pe.REVOKED );
  135                    this .consentMa nagementSe rvice
  136                                      .process ConsentDir ectiveRevo cation(req uest);
  137           }
  138  
  139   }