package ru.yandex.qatools.proc.test;

import org.hamcrest.Matcher;
import org.junit.Test;

import java.lang.reflect.Method;
import java.util.stream.Stream;

import static java.util.stream.Collectors.toList;
import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;

/**
 * @author Vladislav Bauer
 */

public class LordTest {

    @Test
    public void shouldFindMatcherClassForOwner() throws Exception {
        assertThat(Class.forName(LordMatchers.class.getCanonicalName()), notNullValue());
    }

    @Test
    public void shouldFindMatchersForAllField() throws Exception {
        assertThat(
                Stream.of(LordMatchers.class.getDeclaredMethods()).map(Method::getName).collect(toList()), 
                hasItems("withName", "withSlavesCount")
        );
        assertThat(LordMatchers.class.getDeclaredMethod("withName", Matcher.class), notNullValue());
        assertThat(LordMatchers.class.getDeclaredMethod("withSlavesCount", Matcher.class), notNullValue());
    }

}

@@ -204,58 +204,8 @@
 st;%0A
-import static org.hamcrest.CoreMatchers.hasItems;%0A
 impo
@@ -306,16 +306,61 @@
 ertThat;
+%0Aimport static org.hamcrest.Matchers.hasItem;
 %0A%0A/**%0A *
@@ -792,17 +792,16 @@
 List()),
- 
 %0A       
@@ -820,22 +820,9 @@
 Item
-s
 (
-%22withName%22, 
 %22wit
@@ -851,109 +851,8 @@
  );%0A
-        assertThat(LordMatchers.class.getDeclaredMethod(%22withName%22, Matcher.class), notNullValue());%0A
     

fix test