1   package org.kuali.ole;
2   
3   import org.junit.Test;
4   
5   import java.io.File;
6   import java.net.URL;
7   
8   import static junit.framework.Assert.assertNotNull;
9   
10  
11  
12  
13  
14  
15  public class OCLCResponseHandler_UT extends BaseTestCase {
16  
17      @Test
18      public void handleOCLCReponse() throws Exception {
19          OCLCResponseHandler oclcResponseHandler = new OCLCResponseHandler();
20          assertNotNull(oclcResponseHandler);
21  
22          URL resource = getClass().getResource("oclcresponse.txt");
23          String oclcResponse = readFile(new File(resource.toURI()));
24          System.out.println(oclcResponse);
25          String marcxmlFromOCLCResponse = oclcResponseHandler.getMARCXMLFromOCLCResponse(oclcResponse);
26          assertNotNull(marcxmlFromOCLCResponse);
27          System.out.println(marcxmlFromOCLCResponse);
28      }
29  }