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.matchers; 7 8 import java.io.Serializable; 9 10 import org.hamcrest.Description; 11 import org.mockito.ArgumentMatcher; 12 13 14 public class Null extends ArgumentMatcher<Object> implements Serializable { 15 16 private static final long serialVersionUID = 2823082637424390314L; 17 public static final Null NULL = new Null(); 18 Null()19 private Null() { 20 } 21 matches(Object actual)22 public boolean matches(Object actual) { 23 return actual == null; 24 } 25 describeTo(Description description)26 public void describeTo(Description description) { 27 description.appendText("isNull()"); 28 } 29 } 30