BridgeModel implements IModel<Boolean> { @Override public Boolean getObject() { return bridgeStateModel.getObject(); } BridgeModel(IModel<T> innerModel, IModel<T> outerModel, IModel<Boolean> bridgeStateModel, T falseValue); @Override Boolean getObject(); @Override void setObject(Boolean object); @Override void detach();  }
@Test public void testGetObject() { IModel<String> inner = Model.of("inner value"); IModel<String> outer = Model.of("outer value"); IModel<Boolean> state = Model.of(false); String falseValue = "false"; BridgeModel instance = new BridgeModel(inner, outer, state, falseValue); assertFalse(instance.getObject()); instance.setObject(true); assertTrue(instance.getObject()); }