Nominal predictor to be used in regression

But if we have no data for test=[2], then that prior should be our best indicator of what the prediction should be, right? If not the model itself is the problem, correct?