@Test
public void testToOakMachineBuilder() throws Exception {

    final URL expectBaseUrl = new URL(baseUrl, "fullPlan.json");
    final Result<OakpalPlan> fullPlan = OakpalPlan.fromJson(expectBaseUrl);
    assertTrue("full plan is successful", fullPlan.isSuccess());
    final OakpalPlan derived = fullPlan.getOrDefault(null);
    assertNotNull("not null full plan", derived);
    final ErrorListener errorListener = mock(ErrorListener.class);
    final OakMachine machine =
            derived.toOakMachineBuilder(errorListener, Util.getDefaultClassLoader()).build();
    final URL url1 = new URL("http://foo.com/foo1.zip");
    final URL url2 = new URL("http://foo.com/foo2.zip");
    final List<URL> expectPreInstallUrls = Arrays.asList(url1, url2);
    assertEquals("expect preInstallUrls", expectPreInstallUrls, machine.getPreInstallUrls());
}