}
}
@Test
public void getBundle_invalid_name() {
LocalizationServlet ls = new LocalizationServlet();
try {
ls.getJSONBundle( "test-plugin", null );
fail( "Expected exception" );
} catch ( RuntimeException ex ) {
assertTrue( ex.getCause() instanceof IllegalArgumentException );
assertTrue( "Unexpected exception: " + ex.getCause().getMessage(), ex.getCause().getMessage().contains(
"LocalizationServlet.ERROR_0002" ) );
}
try {
ls.getJSONBundle( "test-plugin", "" );
fail( "Expected exception" );
} catch ( RuntimeException ex ) {
assertTrue( ex.getCause() instanceof IllegalArgumentException );
assertTrue( "Unexpected exception: " + ex.getCause().getMessage(), ex.getCause().getMessage().contains(
"LocalizationServlet.ERROR_0002" ) );