Clean up yang-xpath-impl warnings
[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 com.google.common.truth.Truth.assertThat;
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
18     public <T> void fooBar(int index, T element) {
19     }
20
21     @Test
22     public void betterToString() throws Exception {
23         Method method = MethodExtensionsTest.class.getMethod("fooBar", Integer.TYPE, Object.class);
24         assertThat(MethodExtensions.toString(method)).isEqualTo("fooBar(int index, T element)");
25     }
26
27 }