RoadModelBuilders { public static RoadModelBuilders.PlaneRMB plane() { return PlaneRMB.create(); } private  RoadModelBuilders(); static RoadModelBuilders.PlaneRMB plane(); static RoadModelBuilders.StaticGraphRMB staticGraph(Graph<?> graph); static RoadModelBuilders.StaticGraphRMB staticGraph(
      Supplier<? extends Graph<?>> graphSupplier); static RoadModelBuilders.DynamicGraphRMB dynamicGraph(
      ListenableGraph<?> g); static RoadModelBuilders.DynamicGraphRMB dynamicGraph(
      Supplier<? extends ListenableGraph<?>> g);  }
@Test public void testAbstractRMBUnits() { final PlaneRoadModel prm = RoadModelBuilders.plane() .withDistanceUnit(NonSI.LIGHT_YEAR) .withSpeedUnit(NonSI.C) .build(mock(DependencyProvider.class)); assertThat(prm.getDistanceUnit()).isEqualTo(NonSI.LIGHT_YEAR); assertThat(prm.getSpeedUnit()).isEqualTo(NonSI.C); }
@Test public void testPlaneRMB() { final PlaneRMB b = RoadModelBuilders.plane() .withMinPoint(new Point(1, 1)) .withMaxPoint(new Point(2, 2)); assertThat(b.getMin()).isEqualTo(new Point(1, 1)); assertThat(b.getMax()).isEqualTo(new Point(2, 2)); final PlaneRoadModel prm = b.build(mock(DependencyProvider.class)); assertThat(prm.min).isEqualTo(b.getMin()); assertThat(prm.max).isEqualTo(b.getMax()); }