### Question:
DefaultSoyMsgBundleResolver implements SoyMsgBundleResolver { public Optional<SoyMsgBundle> resolve(final Optional<Locale> locale) throws IOException { if (!locale.isPresent()) { return Optional.absent(); } synchronized (msgBundles) { SoyMsgBundle soyMsgBundle = null; if (isHotReloadModeOff()) { soyMsgBundle = msgBundles.get(locale.get()); } if (soyMsgBundle == null) { soyMsgBundle = createSoyMsgBundle(locale.get()); if (soyMsgBundle == null) { soyMsgBundle = createSoyMsgBundle(new Locale(locale.get().getLanguage())); } if (soyMsgBundle == null && fallbackToEnglish) { soyMsgBundle = createSoyMsgBundle(Locale.ENGLISH); } if (soyMsgBundle == null) { return Optional.absent(); } if (isHotReloadModeOff()) { msgBundles.put(locale.get(), soyMsgBundle); } } return Optional.fromNullable(soyMsgBundle); } }  Optional<SoyMsgBundle> resolve(final Optional<Locale> locale); void setMessagesPath(final String messagesPath); void setHotReloadMode(final boolean hotReloadMode); void setFallbackToEnglish(boolean fallbackToEnglish); String getMessagesPath(); boolean isHotReloadMode(); boolean isFallbackToEnglish();  }### Answer:
@Test public void resolveWithNoLocale() throws Exception { Assert.assertFalse("value should be absent", defaultSoyMsgBundleResolver.resolve(Optional.<Locale>absent()).isPresent()); }
@Test public void resolveDefaultMessagePathValuePresent() throws Exception { final Optional<SoyMsgBundle> soyMsgBundleOptional = defaultSoyMsgBundleResolver.resolve(Optional.of(Locale.ENGLISH)); Assert.assertTrue("value should be present", soyMsgBundleOptional.isPresent()); }
@Test public void resolveDefaultMessagePathNotNull() throws Exception { final Optional<SoyMsgBundle> soyMsgBundleOptional = defaultSoyMsgBundleResolver.resolve(Optional.of(Locale.ENGLISH)); Assert.assertNotNull("value should be present", soyMsgBundleOptional.get()); }