@@ -730,6 +730,31 @@ public void testDeleteArchive() throws OpenTokException {
730
730
assertEquals (Archive .Status .EXPIRED , archive .getStatus ());
731
731
}
732
732
733
+ // NOTE: this test is pretty sloppy
734
+ @ Test public void testGetPausedArchive () throws OpenTokException {
735
+ String archiveId = "ARCHIVEID" ;
736
+ stubFor (get (urlEqualTo ("/v2/partner/" +this .apiKey +"/archive/" +archiveId ))
737
+ .willReturn (aResponse ()
738
+ .withStatus (200 )
739
+ .withHeader ("Content-Type" , "application/json" )
740
+ .withBody ("{\n " +
741
+ " \" createdAt\" : 1395187836000,\n " +
742
+ " \" duration\" : 62,\n " +
743
+ " \" id\" : \" " + archiveId + "\" ,\n " +
744
+ " \" name\" : \" \" ,\n " +
745
+ " \" partnerId\" : 123456,\n " +
746
+ " \" reason\" : \" \" ,\n " +
747
+ " \" sessionId\" : \" SESSIONID\" ,\n " +
748
+ " \" size\" : 8347554,\n " +
749
+ " \" status\" : \" paused\" ,\n " +
750
+ " \" url\" : null\n " +
751
+ " }" )));
752
+
753
+ Archive archive = sdk .getArchive (archiveId );
754
+ assertNotNull (archive );
755
+ assertEquals (Archive .Status .PAUSED , archive .getStatus ());
756
+ }
757
+
733
758
@ Test public void testGetArchiveWithUnknownProperties () throws OpenTokException {
734
759
String archiveId = "ARCHIVEID" ;
735
760
stubFor (get (urlEqualTo ("/v2/partner/" +this .apiKey +"/archive/" +archiveId ))
0 commit comments