### Question:
ApnsServiceImpl extends AbstractApnsService { @Override public void push(ApnsNotification msg) throws NetworkIOException { connection.sendMessage(msg); } ApnsServiceImpl(ApnsConnection connection, ApnsFeedbackConnection feedback); @Override void push(ApnsNotification msg); void start(); void stop(); void testConnection();  }### Answer:
@Test public void pushEvantually() { ApnsConnection connection = mock(ApnsConnection.class); ApnsService service = newService(connection, null); service.push(notification); verify(connection, times(1)).sendMessage(notification); }
@Test public void pushEvantuallySample() { ApnsConnection connection = mock(ApnsConnection.class); ApnsService service = newService(connection, null); service.push("2342", "{}"); verify(connection, times(1)).sendMessage(notification); }