test_class.file: frontend/app/src/test/java/com/eddex/jackle/jumpcutter/internet/ServerWrapperTest.java
test_class.identifier: ServerWrapperTest
test_case.body: @Test
      public void processVideo_ProcessingFailed_ReturnsNull() {
  
          MockInterceptor okHttpMockInterceptor = new MockInterceptor();
          okHttpMockInterceptor.addRule()
                  .get()
                  .urlStarts("https://jumpcutter.letum.ch/process")
                  .answer(request -> new Response.Builder().code(500));
          OkHttpClient okHttpClient = new OkHttpClient.Builder()
                  .addInterceptor(okHttpMockInterceptor)
                  .build();
  
          ServerWrapper server = new ServerWrapper(okHttpClient, null);
          SettingsProvider settingsProviderMock = Mockito.mock(SettingsProvider.class);
          String response = server.processVideo(null, settingsProviderMock);
  
          Assert.assertEquals(null, response);
      }
test_case.class_method_signature: ServerWrapperTest.processVideo_ProcessingFailed_ReturnsNull()
test_case.full_signature: @Test public void processVideo_ProcessingFailed_ReturnsNull()
test_case.identifier: processVideo_ProcessingFailed_ReturnsNull
test_case.invocations: answer urlStarts get addRule code build addInterceptor mock processVideo assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void processVideo_ProcessingFailed_ReturnsNull()
focal_class.declarator: HasError = false
focal_class.modifier: public
focal_class.original_string: public boolean HasError = false;
focal_class.type: boolean
focal_class.var_name: HasError
focal_class.declarator: okHttpClient
focal_class.modifier: private final
focal_class.original_string: private final OkHttpClient okHttpClient;
focal_class.type: OkHttpClient
focal_class.var_name: okHttpClient
focal_class.declarator: filesystemWrapper
focal_class.modifier: private final
focal_class.original_string: private final FileSystemWrapper filesystemWrapper;
focal_class.type: FileSystemWrapper
focal_class.var_name: filesystemWrapper
focal_class.declarator: Scheme = "https"
focal_class.modifier: private final
focal_class.original_string: private final String Scheme = "https";
focal_class.type: String
focal_class.var_name: Scheme
focal_class.declarator: Host = "jumpcutter.letum.ch"
focal_class.modifier: private final
focal_class.original_string: private final String Host = "jumpcutter.letum.ch";
focal_class.type: String
focal_class.var_name: Host
focal_class.file: frontend/app/src/main/java/com/eddex/jackle/jumpcutter/internet/ServerWrapper.java
focal_class.identifier: ServerWrapper
focal_class.class_method_signature: ServerWrapper.ServerWrapper(OkHttpClient okHttpClient, FileSystemWrapper filesystemWrapper)
focal_class.full_signature: @Inject public  ServerWrapper(OkHttpClient okHttpClient, FileSystemWrapper filesystemWrapper)
focal_class.identifier: ServerWrapper
focal_class.modifiers: @Inject public
focal_class.parameters: (OkHttpClient okHttpClient, FileSystemWrapper filesystemWrapper)
focal_class.signature:  ServerWrapper(OkHttpClient okHttpClient, FileSystemWrapper filesystemWrapper)
focal_class.class_method_signature: ServerWrapper.ping()
focal_class.full_signature: public Boolean ping()
focal_class.identifier: ping
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Boolean
focal_class.signature: Boolean ping()
focal_class.class_method_signature: ServerWrapper.uploadVideo(File video)
focal_class.full_signature: public String uploadVideo(File video)
focal_class.identifier: uploadVideo
focal_class.modifiers: public
focal_class.parameters: (File video)
focal_class.return: String
focal_class.signature: String uploadVideo(File video)
focal_class.class_method_signature: ServerWrapper.downloadYouTubeVideo(String youtubeUrl)
focal_class.full_signature: public String downloadYouTubeVideo(String youtubeUrl)
focal_class.identifier: downloadYouTubeVideo
focal_class.modifiers: public
focal_class.parameters: (String youtubeUrl)
focal_class.return: String
focal_class.signature: String downloadYouTubeVideo(String youtubeUrl)
focal_class.class_method_signature: ServerWrapper.processVideo(String videoId, SettingsProvider settingsProvider)
focal_class.full_signature: public String processVideo(String videoId, SettingsProvider settingsProvider)
focal_class.identifier: processVideo
focal_class.modifiers: public
focal_class.parameters: (String videoId, SettingsProvider settingsProvider)
focal_class.return: String
focal_class.signature: String processVideo(String videoId, SettingsProvider settingsProvider)
focal_class.class_method_signature: ServerWrapper.downloadVideo(String downloadId)
focal_class.full_signature: public boolean downloadVideo(String downloadId)
focal_class.identifier: downloadVideo
focal_class.modifiers: public
focal_class.parameters: (String downloadId)
focal_class.return: boolean
focal_class.signature: boolean downloadVideo(String downloadId)
focal_class.class_method_signature: ServerWrapper.getStringResponseFromServer(Request request)
focal_class.full_signature: private String getStringResponseFromServer(Request request)
focal_class.identifier: getStringResponseFromServer
focal_class.modifiers: private
focal_class.parameters: (Request request)
focal_class.return: String
focal_class.signature: String getStringResponseFromServer(Request request)
focal_method.body: public String processVideo(String videoId, SettingsProvider settingsProvider) {
  
          ProcessUrlBuilder urlBuilder = new ProcessUrlBuilder()
                  .withHost(this.Host)
                  .withScheme(this.Scheme)
                  //.withPort(this.Port)
                  .withVideoId(videoId)
                  .withSoundedSpeed(settingsProvider.getSoundSpeed())
                  .withSilentSpeed(settingsProvider.getSilenceSpeed())
                  .withSilentThreshold(settingsProvider.getSilenceThreshold())
                  .withFrameMargin(settingsProvider.getFrameMargin());
  
          if (settingsProvider.getAdvancedOptionsSwitchEnabled()) {
              urlBuilder
                  .withSampleRate(settingsProvider.getSampleRate())
                  .withFrameRate(settingsProvider.getFrameRate())
                  .withFrameQuality(settingsProvider.getFrameQuality());
          }
  
          HttpUrl url = urlBuilder.build();
          Request request = new Request.Builder()
                  .url(url)
                  .get()
                  .build();
  
          return this.getStringResponseFromServer(request);
      }
focal_method.class_method_signature: ServerWrapper.processVideo(String videoId, SettingsProvider settingsProvider)
focal_method.full_signature: public String processVideo(String videoId, SettingsProvider settingsProvider)
focal_method.identifier: processVideo
focal_method.invocations: withFrameMargin withSilentThreshold withSilentSpeed withSoundedSpeed withVideoId withScheme withHost getSoundSpeed getSilenceSpeed getSilenceThreshold getFrameMargin getAdvancedOptionsSwitchEnabled withFrameQuality withFrameRate withSampleRate getSampleRate getFrameRate getFrameQuality build build get url getStringResponseFromServer
focal_method.modifiers: public
focal_method.parameters: (String videoId, SettingsProvider settingsProvider)
focal_method.return: String
focal_method.signature: String processVideo(String videoId, SettingsProvider settingsProvider)