<commit_before>package com.stripe.model;

import com.stripe.BaseStripeTest;
import com.stripe.model.StripeObject;

import java.io.IOException;

import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class ExpandableFieldSerializerTest extends BaseStripeTest {

    private class TestNestedObject implements HasId {
        String id;
        int bar;

        public String getId() {
            return id;
        }
    }

    private class TestTopLevelObject extends StripeObject {
        ExpandableField<TestNestedObject> nested;
    }

    @Test
    public void serializeNotExpanded() throws IOException {
        TestTopLevelObject object = new TestTopLevelObject();
        object.nested = new ExpandableField<TestNestedObject>("id_not_expanded", null);

        String expected = "{\n  \"nested\": \"id_not_expanded\"\n}";
        assertEquals(expected, object.toJson());
    }

    @Test
    public void serializeExpanded() throws IOException {
        TestNestedObject nested = new TestNestedObject();
        nested.id = "id_expanded";
        nested.bar = 42;
        TestTopLevelObject object = new TestTopLevelObject();
        object.nested = new ExpandableField<TestNestedObject>(nested.id, nested);

        String expected = "{\n  \"nested\": {\n    \"id\": \"id_expanded\",\n    \"bar\": 42\n  }\n}";
        assertEquals(expected, object.toJson());
    }

    @Test
    public void serializeNull() throws IOException {
        TestTopLevelObject object = new TestTopLevelObject();
        object.nested = new ExpandableField<TestNestedObject>(null, null);

        String expected = "{\n  \"nested\": null\n}";
        assertEquals(expected, object.toJson());
    }
}
<commit_msg>Switch indentation to tabs<commit_after>package com.stripe.model;

import com.stripe.BaseStripeTest;
import com.stripe.model.StripeObject;

import java.io.IOException;

import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class ExpandableFieldSerializerTest extends BaseStripeTest {

	private class TestNestedObject implements HasId {
		String id;
		int bar;

		public String getId() {
			return id;
		}
	}

	private class TestTopLevelObject extends StripeObject {
		ExpandableField<TestNestedObject> nested;
	}

	@Test
	public void serializeNotExpanded() throws IOException {
		TestTopLevelObject object = new TestTopLevelObject();
		object.nested = new ExpandableField<TestNestedObject>("id_not_expanded", null);

		String expected = "{\n  \"nested\": \"id_not_expanded\"\n}";
		assertEquals(expected, object.toJson());
	}

	@Test
	public void serializeExpanded() throws IOException {
		TestNestedObject nested = new TestNestedObject();
		nested.id = "id_expanded";
		nested.bar = 42;
		TestTopLevelObject object = new TestTopLevelObject();
		object.nested = new ExpandableField<TestNestedObject>(nested.id, nested);

		String expected = "{\n  \"nested\": {\n    \"id\": \"id_expanded\",\n    \"bar\": 42\n  }\n}";
		assertEquals(expected, object.toJson());
	}

	@Test
	public void serializeNull() throws IOException {
		TestTopLevelObject object = new TestTopLevelObject();
		object.nested = new ExpandableField<TestNestedObject>(null, null);

		String expected = "{\n  \"nested\": null\n}";
		assertEquals(expected, object.toJson());
	}
}

{'fraction_non_alphanumeric': 0.11499847885609979, 'fraction_numerical': 0.002433830240340736, 'mean_word_length': 3.6704545454545454, 'pattern_counts': {'":': 10, '<': 11, '<?xml version=': 0, '>': 11, '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': '6816186', 'n_tokens_mistral': 1014, 'n_tokens_neox': 962, 'n_words': 233}