1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6 package org.mockito.internal.verification; 7 8 import org.mockito.invocation.Invocation; 9 10 import java.io.Serializable; 11 import java.util.Collections; 12 import java.util.List; 13 14 public class SingleRegisteredInvocation implements RegisteredInvocations, Serializable { 15 16 private Invocation invocation; 17 add(Invocation invocation)18 public void add(Invocation invocation) { 19 this.invocation = invocation; 20 } 21 removeLast()22 public void removeLast() { 23 invocation = null; 24 } 25 getAll()26 public List<Invocation> getAll() { 27 return Collections.emptyList(); 28 } 29 clear()30 public void clear() { 31 invocation = null; 32 } 33 isEmpty()34 public boolean isEmpty() { 35 return invocation == null; 36 } 37 } 38