01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.net.protocol.tcm;
05:
06: import com.tc.exception.ImplementMe;
07: import com.tc.net.groups.ClientID;
08: import com.tc.object.session.SessionID;
09:
10: import junit.framework.TestCase;
11:
12: public class MessageMonitorImplTest extends TestCase {
13:
14: public void tests() throws Exception {
15: MessageMonitorImpl mm = new MessageMonitorImpl();
16: mm.newIncomingMessage(new TestTCMessage());
17: mm.newOutgoingMessage(new TestTCMessage());
18: System.out.println(mm);
19: }
20:
21: private static class TestTCMessage implements TCMessage {
22:
23: public int getCorrelationId(boolean initialize) {
24: return 0;
25: }
26:
27: public void setCorrelationId(int id) {
28: return;
29: }
30:
31: public TCMessageType getMessageType() {
32: return TCMessageType.ACKNOWLEDGE_TRANSACTION_MESSAGE;
33: }
34:
35: public void hydrate() {
36: return;
37: }
38:
39: public void dehydrate() {
40: return;
41: }
42:
43: public void send() {
44: return;
45: }
46:
47: public MessageChannel getChannel() {
48: return null;
49: }
50:
51: public int getTotalLength() {
52: return 100;
53: }
54:
55: public ClientID getClientID() {
56: return null;
57: }
58:
59: public boolean resend() {
60: throw new ImplementMe();
61:
62: }
63:
64: public SessionID getLocalSessionID() {
65: throw new ImplementMe();
66: }
67:
68: }
69: }
|