- dfcHttpsClientSpy = spy(new DfcHttpsClient(createFileServerData(), connectionManager));
- }
-
- @Test
- void fileServerData_properLocationBasicAuth() throws Exception {
- boolean result = dfcHttpsClientSpy.basicAuthValidNotPresentOrThrow();
- assertEquals(true, result);
- }
-
- @Test
- void fileServerData_properLocationNoBasicAuth() throws Exception {
- dfcHttpsClientSpy = spy(new DfcHttpsClient(emptyUserInFileServerData(), connectionManager));
-
- boolean result = dfcHttpsClientSpy.basicAuthValidNotPresentOrThrow();
- assertEquals(false, result);
- }
-
- @Test
- void fileServerData_improperAuthDataExceptionOccurred() throws Exception {
- dfcHttpsClientSpy = spy(new DfcHttpsClient(invalidUserInFileServerData(), connectionManager));
-
- assertThrows(DatafileTaskException.class, () -> dfcHttpsClientSpy.basicAuthValidNotPresentOrThrow());
+ SecurityContext ctx = new SecurityContext("");
+ dfcHttpsClientSpy = spy(new DfcHttpsClient(ctx, createFileServerData(), connectionManager));