Modernize testutils tests
[yangtools.git] / common / testutils / src / test / java / org / opendaylight / yangtools / testutils / mockito / tests / MethodExtensionsTest.java
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.testutils.mockito.tests;
9
10 import static org.junit.Assert.assertEquals;
11
12 import java.lang.reflect.Method;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.testutils.mockito.MethodExtensions;
15
16 public class MethodExtensionsTest {
17     public <T> void fooBar(int index, T element) {
18         // No-op
19     }
20
21     @Test
22     public void betterToString() throws Exception {
23         Method method = MethodExtensionsTest.class.getMethod("fooBar", Integer.TYPE, Object.class);
24         assertEquals("fooBar(int index, T element)", MethodExtensions.toString(method));
25     }
26 }