### Question:
ProgressBar extends Panel { public ProgressBar(String id, ProgressionModel model) { super(id, model); add(new Label("label", getLabelModel(model))); add(new Label("message", getMessageModel(model))); add(new WebMarkupContainer("bar").add(new AttributeModifier("style", new IModel<String>() { private static final long serialVersionUID = 1L; @Override public String getObject() { ProgressionModel model = (ProgressionModel)getDefaultModel(); Progression progression = model.getProgression(); return "width: " + progression.getProgress() + "%"; } }))); setOutputMarkupId(true); } ProgressBar(String id, ProgressionModel model); @Override void renderHead(IHeaderResponse response); void start(AjaxRequestTarget target); int getWidth(); void setWidth(int width);  }### Answer:
@Test public void testProgressBar() { WicketTester wt = new WicketTester(); final DummyTask testProgressive = new DummyTask(); Panel progressBar = new ProgressBar("panelId", new ProgressionModel() { private static final long serialVersionUID = 1L; @Override protected Progression getProgression() { return new Progression(testProgressive.getProgress()); } }); wt.startComponentInPage(progressBar, null); wt.assertLabel("panelId:label", "0%"); testProgressive.proceed(50); wt.assertLabel("panelId:label", "50%"); assertTrue(progressBar.getOutputMarkupId()); }