<commit_before>package synapticloop.b2.request;

import org.apache.http.impl.client.HttpClients;
import org.junit.Test;
import synapticloop.b2.BucketType;
import synapticloop.b2.helper.B2TestHelper;
import synapticloop.b2.response.B2AuthorizeAccountResponse;
import synapticloop.b2.response.B2BucketResponse;
import synapticloop.b2.response.B2FileResponse;
import synapticloop.b2.response.B2StartLargeFileResponse;

import java.util.Collections;
import java.util.UUID;

import static org.junit.Assert.*;

public class B2StartLargeFileRequestTest {

	@Test
	public void getResponse() throws Exception {
		B2AuthorizeAccountResponse b2AuthorizeAccountResponse = B2TestHelper.getB2AuthorizeAccountResponse();

		B2BucketResponse privateBucket = B2TestHelper.createRandomPrivateBucket();

		String privateBucketId = privateBucket.getBucketId();
		B2StartLargeFileResponse b2StartLargeFileResponse = new B2StartLargeFileRequest(HttpClients.createDefault(), b2AuthorizeAccountResponse,
				privateBucketId, UUID.randomUUID().toString(), null, Collections.<String, String>emptyMap()).getResponse();
		assertNotNull(b2StartLargeFileResponse.getFileId());

		final B2GetUploadPartUrlRequest b2GetUploadPartUrlRequest = new B2GetUploadPartUrlRequest(HttpClients.createDefault(),
				b2AuthorizeAccountResponse, b2StartLargeFileResponse.getFileId());
		assertNotNull(b2GetUploadPartUrlRequest.getResponse().getUploadUrl());

		final B2FileResponse b2FileResponse = new B2CancelLargeFileRequest(HttpClients.createDefault(), b2AuthorizeAccountResponse,
				b2StartLargeFileResponse.getFileId()).getResponse();
		assertEquals(b2StartLargeFileResponse.getFileId(), b2FileResponse.getFileId());

		B2TestHelper.deleteBucket(privateBucketId);
	}
}<commit_msg>Add test.<commit_after>package synapticloop.b2.request;

import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.junit.Test;
import synapticloop.b2.BucketType;
import synapticloop.b2.helper.B2TestHelper;
import synapticloop.b2.response.*;

import java.util.Collections;
import java.util.UUID;

import static org.junit.Assert.*;

public class B2StartLargeFileRequestTest {

	@Test
	public void getResponse() throws Exception {
		B2AuthorizeAccountResponse b2AuthorizeAccountResponse = B2TestHelper.getB2AuthorizeAccountResponse();

		B2BucketResponse privateBucket = B2TestHelper.createRandomPrivateBucket();

		String privateBucketId = privateBucket.getBucketId();
		final CloseableHttpClient client = HttpClients.createDefault();

		B2StartLargeFileResponse b2StartLargeFileResponse = new B2StartLargeFileRequest(client, b2AuthorizeAccountResponse,
				privateBucketId, UUID.randomUUID().toString(), null, Collections.<String, String>emptyMap()).getResponse();
		assertNotNull(b2StartLargeFileResponse.getFileId());

		final B2GetUploadPartUrlRequest b2GetUploadPartUrlRequest = new B2GetUploadPartUrlRequest(client,
				b2AuthorizeAccountResponse, b2StartLargeFileResponse.getFileId());
		assertNotNull(b2GetUploadPartUrlRequest.getResponse().getUploadUrl());

		final B2ListPartsResponse b2ListPartsResponse = new B2ListPartsRequest(client, b2AuthorizeAccountResponse,
				b2StartLargeFileResponse.getFileId()).getResponse();
		assertTrue(b2ListPartsResponse.getFiles().isEmpty());

		final B2FileResponse b2FileResponse = new B2CancelLargeFileRequest(client, b2AuthorizeAccountResponse,
				b2StartLargeFileResponse.getFileId()).getResponse();
		assertEquals(b2StartLargeFileResponse.getFileId(), b2FileResponse.getFileId());

		B2TestHelper.deleteBucket(privateBucketId);
	}
}
{'fraction_non_alphanumeric': 0.08961474036850921, 'fraction_numerical': 0.020938023450586266, 'mean_word_length': 8.453825857519789, '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': '3836499', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1018, 'n_words': 153}