### Question:
AlterTableFactory { public static AlterTableHandler createHandler(AlterOptions alterOptions) throws ExecutionException { AlterTableHandler handler; switch (alterOptions.getOption()) { case ADD_COLUMN: handler = new AddColumnHandler(alterOptions); break; default: throw new ExecutionException("The altar table operation " + alterOptions.getOption().name() + " " + "is not supporting"); } return handler; } private  AlterTableFactory(); static AlterTableHandler createHandler(AlterOptions alterOptions);  }### Answer:
@Test public void testCreateAddColumnHandeler() throws Exception { AlterOptions alterOptions = new AlterOptions(AlterOperation.ADD_COLUMN, Collections.EMPTY_MAP, null); assertEquals("The instance is correct", AddColumnHandler.class.getCanonicalName(), AlterTableFactory .createHandler(alterOptions).getClass().getCanonicalName()); }
@Test(expected = ExecutionException.class) public void testAlterColumnHandler() throws Exception { AlterOptions alterOptions = new AlterOptions(AlterOperation.ALTER_COLUMN, Collections.EMPTY_MAP, null); assertEquals("The instance is correct", AddColumnHandler.class.getCanonicalName(), AlterTableFactory .createHandler(alterOptions).getClass().getCanonicalName()); }
@Test(expected = ExecutionException.class) public void testAlterOptionsHandeler() throws Exception { AlterOptions alterOptions = new AlterOptions(AlterOperation.ALTER_OPTIONS, Collections.EMPTY_MAP, null); assertEquals("The instance is correct", AddColumnHandler.class.getCanonicalName(), AlterTableFactory .createHandler(alterOptions).getClass().getCanonicalName()); }
@Test(expected = ExecutionException.class) public void testDropColumnHandeler() throws Exception { AlterOptions alterOptions = new AlterOptions(AlterOperation.DROP_COLUMN, Collections.EMPTY_MAP, null); assertEquals("The instance is correct", AddColumnHandler.class.getCanonicalName(), AlterTableFactory .createHandler(alterOptions).getClass().getCanonicalName()); }