@Test
public void testSelectLocationOnlyOneEvent() throws Exception {
final ObjectContainer container = new ObjectContainer();
GeocoderPresenter presenter = new GeocoderPresenter(null, null);
presenter.setSelectLocationHandler(new SelectLocationHandler() {
public void onSelectLocation(SelectLocationEvent event) {
Assert.fail("This handler should be overwritten");
}
});
presenter.setSelectLocationHandler(new SelectLocationHandler() {
public void onSelectLocation(SelectLocationEvent event) {
container.object = "ok";
}
});
presenter.goToLocation(matchedResponse, "2");