doRemoveBreakpoint(breakpointInfo.getBreakpoint());
}
public void testUpdateBreakpoint() {
doRunDebugger();
BreakpointInfoImpl breakpointInfo = doSetBreakpoint();
JsonArray<Location> locations = JsonCollections.createArray();
final Location location1 = createLocation(1, 10, "source_id_1");
final Location location2 = createLocation(2, 20, "source_id_2");
locations.add(location1);
locations.add(location2);
debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, breakpointInfo, locations);
assertEquals(2, breakpointInfo.getLocations().size());
assertEquals(location1, breakpointInfo.getLocations().get(0));
assertEquals(location2, breakpointInfo.getLocations().get(1));
// Update with no breakpointInfo.
locations = JsonCollections.createArray();
final Location location3 = createLocation(3, 30, "source_id_3");
locations.add(location3);
debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, null,
breakpointInfo.getBreakpointId(), locations);
assertEquals(3, breakpointInfo.getLocations().size());
assertEquals(location3, breakpointInfo.getLocations().get(2));
}