package net.crizin;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

public class KoreanRomanizerTest {
	private KoreanRomanizer koreanRomanizer;

	@BeforeAll
	public void setUp() {
		koreanRomanizer = new KoreanRomanizer();
	}

	@Test
	public void testException() {
		Throwable exception = assertThrows(NullPointerException.class, () -> koreanRomanizer.romanize(null));
		assertEquals("String should not be null.", exception.getMessage());
	}

	@Test
	public void testNormal() {
		assertEquals("", koreanRomanizer.romanize(""));
		assertEquals("Seoraksan", koreanRomanizer.romanize("설악산"));
	}

	@Test
	public void testNormalUseHyphen() {
		assertEquals("Hae-undae", koreanRomanizer.romanize("해운대"));

		koreanRomanizer.setUseHyphenWhenVowelConfused(false);
		assertEquals("Haeundae", koreanRomanizer.romanize("해운대"));
	}

	@Test
	public void testCapitalize() {
		assertEquals("Beullumbeogeu: FTC, Gugeulgwa MotorolaUi FRAND Namyong-e Daehae Josa Chaksu",
				koreanRomanizer.romanize("블룸버그: FTC, 구글과 Motorola의 FRAND 남용에 대해 조사 착수"));

		koreanRomanizer.setCapitalizeOnFirstLetter(false);
		assertEquals("beullumbeogeu: FTC, gugeulgwa Motorolaui FRAND namyong-e daehae josa chaksu",
				koreanRomanizer.romanize("블룸버그: FTC, 구글과 Motorola의 FRAND 남용에 대해 조사 착수"));
	}
}
@@ -18,48 +18,8 @@
 n;%0A%0A
-import org.junit.jupiter.api.BeforeAll;%0A
 impo
@@ -213,169 +213,103 @@
  %7B%0A%09
-private KoreanRomanizer koreanRomanizer;%0A%0A%09@BeforeAll%0A%09public void setUp() %7B%0A%09%09koreanRomanizer = new KoreanRomanizer();%0A%09%7D%0A%0A%09@Test%0A%09public void testException() %7B
+@Test%0A%09public void testException() %7B%0A%09%09KoreanRomanizer koreanRomanizer = new KoreanRomanizer();
 %0A%09%09T
@@ -514,24 +514,83 @@
 tNormal() %7B%0A
+%09%09KoreanRomanizer koreanRomanizer = new KoreanRomanizer();%0A
 %09%09assertEqua
@@ -733,24 +733,83 @@
 eHyphen() %7B%0A
+%09%09KoreanRomanizer koreanRomanizer = new KoreanRomanizer();%0A
 %09%09assertEqua
@@ -907,32 +907,33 @@
 onfused(false);%0A
+%0A
 %09%09assertEquals(%22
@@ -1020,16 +1020,75 @@
 ize() %7B%0A
+%09%09KoreanRomanizer koreanRomanizer = new KoreanRomanizer();%0A
 %09%09assert
@@ -1305,16 +1305,17 @@
 false);%0A
+%0A
 %09%09assert

Fix broken test.