/** * Verify dispose functionality * <p> * @throws IOException */ public void testDispose_normal() throws IOException { // SETUP RemoteHttpCacheAttributes attributes = new RemoteHttpCacheAttributes(); RemoteHttpCacheClient<String, String> client = new RemoteHttpCacheClient<String, String>( attributes ); MockRemoteCacheDispatcher mockDispatcher = new MockRemoteCacheDispatcher(); client.setRemoteDispatcher( mockDispatcher ); String cacheName = "test"; // DO WORK client.dispose( cacheName ); // VERIFY assertEquals( "Wrong type.", RemoteRequestType.DISPOSE, mockDispatcher.lastRemoteCacheRequest .getRequestType() ); } }
/** * Verify dispose functionality * <p> * @throws IOException */ public void testDispose_normal() throws IOException { // SETUP RemoteHttpCacheAttributes attributes = new RemoteHttpCacheAttributes(); RemoteHttpCacheClient<String, String> client = new RemoteHttpCacheClient<String, String>( attributes ); MockRemoteCacheDispatcher mockDispatcher = new MockRemoteCacheDispatcher(); client.setRemoteDispatcher( mockDispatcher ); String cacheName = "test"; // DO WORK client.dispose( cacheName ); // VERIFY assertEquals( "Wrong type.", RemoteRequestType.DISPOSE, mockDispatcher.lastRemoteCacheRequest .getRequestType() ); } }