### Question:
PreconditionFactory { public void register(Class<? extends Precondition> clazz) { try { preconditions.put(clazz.newInstance().getName(), clazz); } catch (Exception e) { throw new UnexpectedLiquibaseException(e); } } @SuppressWarnings("unchecked") private  PreconditionFactory(); static PreconditionFactory getInstance(); static void reset(); Map<String, Class<? extends Precondition>> getPreconditions(); void register(Class<? extends Precondition> clazz); void unregister(String name); Precondition create(String tagName);  }### Answer:
@Test public void register() { PreconditionFactory.getInstance().getPreconditions().clear(); assertEquals(0, PreconditionFactory.getInstance().getPreconditions().size()); PreconditionFactory.getInstance().register(MockPrecondition.class); assertEquals(1, PreconditionFactory.getInstance().getPreconditions().size()); }