### Question:
PhantomJsResolver { public Builder options(PhantomJsResolverOptions options) { return new Builder(resolverFactory, options); } @Inject  PhantomJsResolver(ResolverFactory resolverFactory); Builder options(PhantomJsResolverOptions options);  }### Answer:
@Test public void testResolve() { when(resolverFactory.create(eq(options), any(RepositoryDetails.class))).thenReturn(resolver); when(resolver.resolve()).thenReturn(MOCK_EXECUTABLE_PATH); String executable = phantomJsResolver.options(options) .repositorySystem(repositorySystem) .repositorySystemSession(repositorySystemSession) .remoteRepositories(new ArrayList<RemoteRepository>()) .resolve(); assertThat(executable).isEqualTo(MOCK_EXECUTABLE_PATH); }