<commit_before>package com.messagebird;

import com.messagebird.exceptions.GeneralException;
import com.messagebird.exceptions.NotFoundException;
import com.messagebird.exceptions.UnauthorizedException;
import com.messagebird.objects.*;
import org.junit.*;

import static org.junit.Assert.*;

/**
 * Contacts are a bit different when it comes to testing from other
 * resources/endpoints: the other tests always operate on the same MSISDN, but
 * that would cause problems here as we can not have multiple contacts with
 * equal MSISDNs. We therefore generate a random MSIDSN before running the
 * tests here, and clean up by deleting it afterwards.
 * We can't simply delete the contact first if it exists, because we do not
 * know its ID.
 */
public class ContactTest {

    private static MessageBirdServiceImpl messageBirdService;
    private static MessageBirdClient messageBirdClient;

    private static String msisdn;

    /**
     * Contact object to operate on during tests.
     */
    private static Contact contact;

    @BeforeClass
    public static void setUpClass() throws UnauthorizedException, GeneralException {
        String accessKey = System.getProperty("messageBirdAccessKey");

        msisdn = generateMsisdn();

        messageBirdService = new MessageBirdServiceImpl(accessKey);
        messageBirdClient = new MessageBirdClient(messageBirdService);

        createContact();
    }

    private static void createContact() throws UnauthorizedException, GeneralException {
        ContactRequest contactRequest = new ContactRequest(msisdn);

        contact = messageBirdClient.sendContact(contactRequest);
    }

    private static String generateMsisdn() {
        final long lower = 31600000000L, upper = 31699999999L;

        long msisdn = lower + (long) (Math.random() * (upper - lower));
<commit_msg>Move javadoc to more method<commit_after>package com.messagebird;

import com.messagebird.exceptions.GeneralException;
import com.messagebird.exceptions.NotFoundException;
import com.messagebird.exceptions.UnauthorizedException;
import com.messagebird.objects.*;
import org.junit.*;

import static org.junit.Assert.*;

public class ContactTest {

    private static MessageBirdServiceImpl messageBirdService;
    private static MessageBirdClient messageBirdClient;

    private static String msisdn;

    /**
     * Contact object to operate on during tests.
     */
    private static Contact contact;

    @BeforeClass
    public static void setUpClass() throws UnauthorizedException, GeneralException {
        String accessKey = System.getProperty("messageBirdAccessKey");

        msisdn = generateMsisdn();

        messageBirdService = new MessageBirdServiceImpl(accessKey);
        messageBirdClient = new MessageBirdClient(messageBirdService);

        createContact();
    }

    private static void createContact() throws UnauthorizedException, GeneralException {
        ContactRequest contactRequest = new ContactRequest(msisdn);

        contact = messageBirdClient.sendContact(contactRequest);
    }

    /**
     * Contacts are a bit different when it comes to testing from other
     * resources/endpoints: the other tests always operate on the same MSISDN, but
     * that would cause problems here as we can not have multiple contacts with
     * equal MSISDNs. We therefore generate a random MSIDSN before running the
     * tests here, and clean up by deleting it afterwards.
     * We can't simply delete the contact first if it exists, because we do not
     * know its ID.
     */
    private static String generateMsisdn() {
        final long lower = 31600000000L, upper = 31699999999L;

        long msisdn = lower + (long) (Math.random() * (upper - lower));

{'fraction_non_alphanumeric': 0.06824288017195057, 'fraction_numerical': 0.011821601289629231, 'mean_word_length': 3.7306226175349426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '7653540', 'n_tokens_mistral': 979, 'n_tokens_neox': 914, 'n_words': 332}