@Test
public void testInitResourceBundle() throws Exception {

    CompletableFuture<ResourceBundle> callback = new CompletableFuture<>();
    OakpalPlan plan = builder().build();
    ProgressCheck check = mock(ProgressCheck.class);
    doAnswer(call -> callback.complete(call.getArgument(0)))
            .when(check).setResourceBundle(nullable(ResourceBundle.class));
    when(check.getResourceBundleBaseName()).thenReturn(null);
    plan.initResourceBundle(check, Locale.getDefault(), getClass().getClassLoader());
    assertFalse("expect callback not done", callback.isDone());
    when(check.getResourceBundleBaseName()).thenReturn(getClass().getName());
    plan.initResourceBundle(check, Locale.getDefault(), getClass().getClassLoader());
    assertSame("expect callback complete with", ResourceBundle.getBundle(getClass().getName()),
            callback.getNow(null));
}