public void testToGwoyeuRomatzyhStringArray() {
    // any input of non-Chinese characters will return null
    {
      assertNull(PinyinHelper.toGwoyeuRomatzyhStringArray('A'));
      assertNull(PinyinHelper.toGwoyeuRomatzyhStringArray('z'));
      assertNull(PinyinHelper.toGwoyeuRomatzyhStringArray(','));
      assertNull(PinyinHelper.toGwoyeuRomatzyhStringArray('。'));
    }

    // Chinese characters
    // single pronounciation
    {
      String[] expectedPinyinArray = new String[] {"lii"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('李');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }
    {
      String[] expectedPinyinArray = new String[] {"chyou"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('球');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }
    {
      String[] expectedPinyinArray = new String[] {"juang"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('桩');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }

    {
      String[] expectedPinyinArray = new String[] {"fuh"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('付');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }

    // multiple pronounciations
    {
      String[] expectedPinyinArray = new String[] {"chwan", "juann"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('传');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }

    {
      String[] expectedPinyinArray = new String[] {".me", ".mha", "iau"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('么');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }

    {
      String[] expectedPinyinArray = new String[] {"liuh", "luh"};
      String[] pinyinArray = PinyinHelper.toGwoyeuRomatzyhStringArray('绿');

      assertEquals(expectedPinyinArray.length, pinyinArray.length);

      for (int i = 0; i < expectedPinyinArray.length; i++) {
        assertEquals(expectedPinyinArray[i], pinyinArray[i]);
      }
    }
  }