nullOnDetachModel.setObject(ws);
Label label1 = new Label("resourceModelWithComponent", new StringResourceModel(
"wrappedOnAssignment.text", page, nullOnDetachModel));
page.add(label1);
label1.getDefaultModelObject();
label1.detach();
Assert.assertNull(nullOnDetachModel.getObject());
nullOnDetachModel.setObject(ws);
Label label2 = new Label("resourceModelWithoutComponent", new StringResourceModel(
"wrappedOnAssignment.text", nullOnDetachModel));