@Test
public void convertsToSnakeCase() {

    assertThat(CaseUtils.toSnakeCase("foo"), equalTo("foo"));
    assertThat(CaseUtils.toSnakeCase(" foo"), equalTo("_foo"));
    assertThat(CaseUtils.toSnakeCase(" fooBar"), equalTo("_foo_bar"));
    assertThat(CaseUtils.toSnakeCase("10-foo"), equalTo("10_foo"));
    assertThat(CaseUtils.toSnakeCase("_foo"), equalTo("_foo"));
    assertThat(CaseUtils.toSnakeCase("FooBar"), equalTo("foo_bar"));
    assertThat(CaseUtils.toSnakeCase("FooAPI"), equalTo("foo_api"));
    assertThat(CaseUtils.toSnakeCase("Ec2Foo"), equalTo("ec2_foo"));
    assertThat(CaseUtils.toSnakeCase("foo_bar"), equalTo("foo_bar"));
}