I18nInitializer { @PostConstruct public void contextInitialized() { try { languagePackBuilder.start(Paths.get(getClass().getResource("/i18n").toURI())); } catch (IOException | URISyntaxException e) { throw new DesignerInitializerException("Unable to convert po files into json", e); } }  @PostConstruct void contextInitialized();  }
@Test public void should_start_live_build_on_po_directory() throws Exception { i18nInitializer.contextInitialized(); verify(languagePackBuilder).start(eq(Paths.get("target/test-classes/i18n").toAbsolutePath())); }
@Test(expected = RuntimeException.class) public void should_throw_a_runtime_exception_on_io_error() throws Exception { doThrow(new IOException()).when(languagePackBuilder).start(any(Path.class)); i18nInitializer.contextInitialized(); }