package com.conveyal.gtfs.util;

import org.junit.Test;

import static com.conveyal.gtfs.util.Util.human;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

/**
 * A test suite to verify the functionality of methods in the Util class.
 */
public class UtilTest {

    /**
     * Assert that the human function returns strings that are properly formatted.
     */
    @Test
    public void canHumanize() {
        assertThat(human(123), is("123"));
        assertThat(human(1234), is("1k"));
        assertThat(human(1234567), is("1.2M"));
        assertThat(human(1234567890), is("1.2G"));
    }
}

@@ -26,16 +26,41 @@
 .util;%0A%0A
+import org.junit.Before;%0A
 import o
@@ -323,16 +323,147 @@
 ilTest %7B
+%0A    @Before // setup()%0A    public void before() throws Exception %7B%0A        java.util.Locale.setDefault(java.util.Locale.US);%0A    %7D
 %0A%0A    /*

Set locale to US on humanize test