Remove illegal @Override and other polishing

This commit is contained in:
Chris Beams
2010-11-11 10:39:03 -08:00
parent ee34695bc4
commit 8cce5cdc1f
7 changed files with 22 additions and 28 deletions

View File

@@ -59,7 +59,6 @@ public class XmppHeaderEnricherParserTests {
MessagingTemplate messagingTemplate = new MessagingTemplate();
MessageHandler handler = mock(MessageHandler.class);
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
Message message = (Message) invocation.getArguments()[0];
String chatToUser = (String) message.getHeaders().get(XmppHeaders.CHAT_TO_USER);

View File

@@ -49,18 +49,15 @@ public class XmppMessageDrivenEndpointTests {
final Set<PacketListener> packetListSet = new HashSet<PacketListener>();
XMPPConnection connection = mock(XMPPConnection.class);
XmppMessageDrivenEndpoint endpoint = new XmppMessageDrivenEndpoint(connection);
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
packetListSet.add((PacketListener) invocation.getArguments()[0]);
return null;
}
}).when(connection).addPacketListener(Mockito.any(PacketListener.class), (PacketFilter) Mockito.any());
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
packetListSet.remove(invocation.getArguments()[0]);
return null;

View File

@@ -54,17 +54,15 @@ public class XmppRosterEventMessageDrivenEndpointTests {
XMPPConnection connection = mock(XMPPConnection.class);
Roster roster = mock(Roster.class);
when(connection.getRoster()).thenReturn(roster);
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
rosterSet.add((RosterListener) invocation.getArguments()[0]);
return null;
}
}).when(roster).addRosterListener(Mockito.any(RosterListener.class));
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
rosterSet.remove(invocation.getArguments()[0]);
return null;