VideoFoldersHandler extends AbstractFolderHandler { @DELETE @Path("/{id}") @Produces(APPLICATION_JSON) public ConfigurationFolder removeVideoFolder(@PathParam("id") final String id) { return removeFolder(id); } @Inject  VideoFoldersHandler(final BackendManager backendManager); @GET @Produces(APPLICATION_JSON) Collection<ConfigurationFolder> getVideoFolders(); @GET @Path("/{id}") @Produces(APPLICATION_JSON) ConfigurationFolder getVideoFolder(@PathParam("id") final String id); @POST @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) ConfigurationFolder addVideoFolder(final ConfigurationFolder folder); @PUT @Path("/{id}") @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) ConfigurationFolder editVideoFolder(@PathParam("id") final String id, final ConfigurationFolder folder); @DELETE @Path("/{id}") @Produces(APPLICATION_JSON) ConfigurationFolder removeVideoFolder(@PathParam("id") final String id);  }
@Test public void testRemoveVideoFolder() { BackendManager backendManager = createMock(BackendManager.class); backendManager.removeFolder("videosTest", VIDEO); expectLastCall().atLeastOnce(); replay(backendManager); VideoFoldersHandler videoFoldersHandler = new VideoFoldersHandler(backendManager); ConfigurationFolder folder = videoFoldersHandler.removeVideoFolder("videosTest"); assertNotNull(folder); assertEquals(folder.getId(), "videosTest"); verify(backendManager); }