+ engine.copyFile(id, newGroup, policy, userId);
+ PDPPolicy pdpPolicy = Mockito.mock(PDPPolicy.class);
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ engine.copyPolicy(pdpPolicy, newGroup, userId)
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ engine.removePolicy(null, group)
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ engine.copyPolicy(null, null, null)
+ );
+
+ //
+ // Change the mockito to take a different path
+ //
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ setupConnection(HttpServletResponse.SC_FOUND, "localhost:5678")
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ setupConnection(200, "localhost:5678")
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ setupConnection(350, "localhost:5678")
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ setupConnection(500, "localhost:5678")
+ );
+
+ assertThatExceptionOfType(PAPException.class).isThrownBy(() ->
+ setupConnection(350, null)
+ );