@Test
public void testActivateRevision() throws Exception {
String endpoint = "name:type";
String action = "ACTIVATE";
when(request.getPathInfo()).thenReturn("?action=" + action + "&filter_id=" + endpoint + "&revision=2");
when(request.getMethod()).thenReturn("POST");
when(request.getParameter("action")).thenReturn(action);
when(request.getParameter("filter_id")).thenReturn(endpoint);
when(request.getParameter("revision")).thenReturn("2");
ZuulFilterDAOCassandra dao = mock(ZuulFilterDAOCassandra.class);
FilterInfo script = mockEndpointScript();
when(dao.setFilterActive(endpoint, 2)).thenReturn(script);
FilterScriptManagerServlet servlet = getEndpointScriptManagerImplementation(dao);
servlet.service(request, response);
verify(response, never()).setStatus(anyInt());
verify(dao).setFilterActive(endpoint, 2);
}