Remove illegal @Override and other polishing
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user