### Question:
ProducerModel extends FeatureModel implements Producer, Recyclable { @Override public void update(double extrp) { switch (state) { case NONE: progress = -1; break; case WILL_PRODUCE: actionWillProduce(); break; case PRODUCING: actionProducing(); break; case PRODUCED: actionProduced(); break; case CHECK: actionCheck(); break; default: throw new LionEngineException(state); } } ProducerModel(Services services, Setup setup); @Override void prepare(FeatureProvider provider); @Override void checkListener(Object listener); @Override void addListener(ProducerListener listener); @Override void removeListener(ProducerListener listener); @Override void setChecker(ProducerChecker checker); @Override void addToProductionQueue(Featurable featurable); @Override void update(double extrp); @Override void skipProduction(); @Override void stopProduction(); @Override void setStepsSpeed(double stepsPerTick); @Override double getProgress(); @Override int getProgressPercent(); @Override Featurable getProducingElement(); @Override Iterator<Featurable> iterator(); @Override int getQueueLength(); @Override boolean isProducing(); @Override void recycle();  }### Answer:
@Test void testEnumFail() throws ReflectiveOperationException { final ProducerModel producer = new ProducerModel(services, setup); final Field field = producer.getClass().getDeclaredField("state"); UtilReflection.setAccessible(field, true); field.set(producer, ProducerState.values()[5]); assertThrows(() -> producer.update(1.0), "Unknown enum: FAIL"); }