ResourceBundle could not getBundle() when performing JUnit test
<p>I'm trying to test a function by JUnit test.</p>

<pre><code>public void create() {
    Locale locale = new Locale("en");
    persist(PersistAction.CREATE, ResourceBundle.getBundle("/bundle", locale).getString("UserCreated"));
    if (!JsfUtil.isValidationFailed()) {
        items = null;    // Invalidate list of items to trigger re-query.
    }
}
</code></pre>

<p>But I face this error when <code>getBundle()</code>. It's weird since it could get when Run project</p>

<pre><code>Can't find bundle for base name /bundle, locale en
java.util.MissingResourceException
    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:845)
    ...
</code></pre>

<p>I have already added these bundles in src/test/resources, which copied from src/main/resources:</p>

<ul>
<li><p>bundle_en.properties </p></li>
<li><p>bundle_ja.properties</p></li>
</ul>

<p>Please look at this image for structure <a href="https://gyazo.com/297091ef4120a6161bef31c9ead761ef" rel="nofollow">https://gyazo.com/297091ef4120a6161bef31c9ead761ef</a></p>