<commit_before>package com.filestack.util;

import com.filestack.model.FilestackClient;
import com.filestack.model.FileLink;
import okhttp3.OkHttpClient;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import retrofit2.Retrofit;
import retrofit2.mock.BehaviorDelegate;
import retrofit2.mock.MockRetrofit;
import retrofit2.mock.NetworkBehavior;

import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

public class TestUpload {

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    private static MockUploadService createMockUploadService(NetworkBehavior behavior) {

        Retrofit retrofit = new Retrofit.Builder()
                .client(new OkHttpClient())
                .baseUrl(FilestackService.Upload.URL)
                .build();

        MockRetrofit mockRetrofit = new MockRetrofit.Builder(retrofit)
                .networkBehavior(behavior)
                .build();

        BehaviorDelegate<FilestackService.Upload> delegate = mockRetrofit.create(FilestackService.Upload.class);
        return new MockUploadService(delegate);
    }

    private static Path createRandomFile(long size) throws IOException{
        Path path = Paths.get("/tmp/" + UUID.randomUUID().toString() + ".txt");
        RandomAccessFile file = new RandomAccessFile(path.toString(), "rw");
        file.writeChars("test content\n");
        file.setLength(size);
        file.close();
        return path;
    }
<commit_msg>Fix linter warnings for TestUpload<commit_after>package com.filestack.util;

import com.filestack.model.FileLink;
import com.filestack.model.FilestackClient;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import retrofit2.Retrofit;
import retrofit2.mock.BehaviorDelegate;
import retrofit2.mock.MockRetrofit;
import retrofit2.mock.NetworkBehavior;

public class TestUpload {

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    private static MockUploadService createMockUploadService(NetworkBehavior behavior) {

        Retrofit retrofit = new Retrofit.Builder()
                .client(new OkHttpClient())
                .baseUrl(FilestackService.Upload.URL)
                .build();

        MockRetrofit mockRetrofit = new MockRetrofit.Builder(retrofit)
                .networkBehavior(behavior)
                .build();

        BehaviorDelegate<FilestackService.Upload> delegate =
                mockRetrofit.create(FilestackService.Upload.class);
        return new MockUploadService(delegate);
    }

    private static Path createRandomFile(long size) throws IOException {
        Path path = Paths.get("/tmp/" + UUID.randomUUID().toString() + ".txt");
        RandomAccessFile file = new RandomAccessFile(path.toString(), "rw");
        file.writeChars("test content\n");
        file.setLength(size);
        file.close();
        return path;
    }

{'fraction_non_alphanumeric': 0.10032845625559869, 'fraction_numerical': 0.002985965959988056, 'mean_word_length': 3.437086092715232, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3394162', 'n_tokens_mistral': 967, 'n_tokens_neox': 941, 'n_words': 192}