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_WithAdvancedOptions_ServerCallAsExpectedAndDownloadIdReturned() {
  
          String ExpectedDownloadId = "download_id";
  
          String SoundedSpeed = "1";
          String SilentSpeed = "2";
          String SilenceThreshold = "3";
          String FrameMargin = "4";
          String FrameRate = "5";
          String FrameQuality = "6";
          String SampleRate = "7";
  
          MockInterceptor okHttpMockInterceptor = new MockInterceptor();
          okHttpMockInterceptor.addRule()
                  .get()
                  .url(new ProcessUrlBuilder()
                          .withHost("jumpcutter.letum.ch")
                          .withSoundedSpeed(SoundedSpeed)
                          .withSilentSpeed(SilentSpeed)
                          .withSilentThreshold(SilenceThreshold)
                          .withFrameMargin(FrameMargin)
                          .withFrameRate(FrameRate)
                          .withFrameQuality(FrameQuality)
                          .withSampleRate(SampleRate)
                          .build()
                          .toString())
                  .respond(ExpectedDownloadId);
          OkHttpClient okHttpClient = new OkHttpClient.Builder()
                  .addInterceptor(okHttpMockInterceptor)
                  .build();
  
          SettingsProvider settingsProviderMock = Mockito.mock(SettingsProvider.class);
          when(settingsProviderMock.getSoundSpeed())
                  .thenReturn(SoundedSpeed);
          when(settingsProviderMock.getSilenceSpeed())
                  .thenReturn(SilentSpeed);
          when(settingsProviderMock.getSilenceThreshold())
                  .thenReturn(SilenceThreshold);
          when(settingsProviderMock.getFrameMargin())
                  .thenReturn(FrameMargin);
          when(settingsProviderMock.getFrameRate())
                  .thenReturn(FrameRate);
          when(settingsProviderMock.getFrameQuality())
                  .thenReturn(FrameQuality);
          when(settingsProviderMock.getSampleRate())
                  .thenReturn(SampleRate);
          when(settingsProviderMock.getAdvancedOptionsSwitchEnabled())
                  .thenReturn(true);
  
          ServerWrapper server = new ServerWrapper(okHttpClient, null);
          String downloadId = server.processVideo(null, settingsProviderMock);
  
          Assert.assertEquals(ExpectedDownloadId, downloadId);
      }
test_case.class_method_signature: ServerWrapperTest.processVideo_WithAdvancedOptions_ServerCallAsExpectedAndDownloadIdReturned()
test_case.full_signature: @Test public void processVideo_WithAdvancedOptions_ServerCallAsExpectedAndDownloadIdReturned()
test_case.identifier: processVideo_WithAdvancedOptions_ServerCallAsExpectedAndDownloadIdReturned
test_case.invocations: respond url get addRule toString build withSampleRate withFrameQuality withFrameRate withFrameMargin withSilentThreshold withSilentSpeed withSoundedSpeed withHost build addInterceptor mock thenReturn when getSoundSpeed thenReturn when getSilenceSpeed thenReturn when getSilenceThreshold thenReturn when getFrameMargin thenReturn when getFrameRate thenReturn when getFrameQuality thenReturn when getSampleRate thenReturn when getAdvancedOptionsSwitchEnabled processVideo assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void processVideo_WithAdvancedOptions_ServerCallAsExpectedAndDownloadIdReturned()
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)