# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Methods

Deprecated Classes
Class and Description
org.jmock.integration.junit4.JMock For JUnit 4 use `JUnitRuleMockery`

Deprecated Methods
Method and Description
org.jmock.Expectations.a(Class<?>) use `Expectations.aNonNull(java.lang.Class<T>)` or `Expectations.any(java.lang.Class<T>)` until type inference actually works in a future version of Java
org.jmock.Expectations.an(Class<?>) use `Expectations.aNonNull(java.lang.Class<T>)` or `Expectations.any(java.lang.Class<T>)` until type inference actually works in a future version of Java
org.jmock.Expectations.one(T) Use `oneOf` instead.
org.jmock.integration.junit4.JMock.possiblyExpectingExceptions(FrameworkMethod, Object, Statement)