}
@Test
public void testSelectResourceMethod() throws Exception {
ClassResourceInfo cri = new ClassResourceInfo(Customer.class);
OperationResourceInfo ori1 = new OperationResourceInfo(
Customer.class.getMethod("getItAsXML", new Class[]{}),
cri);
ori1.setHttpMethod("GET");
ori1.setURITemplate(new URITemplate("/"));
OperationResourceInfo ori2 = new OperationResourceInfo(
Customer.class.getMethod("getItPlain", new Class[]{}),
cri);
ori2.setHttpMethod("GET");
ori2.setURITemplate(new URITemplate("/"));
MethodDispatcher md = new MethodDispatcher();
md.bind(ori1, Customer.class.getMethod("getItAsXML", new Class[]{}));
md.bind(ori2, Customer.class.getMethod("getItPlain", new Class[]{}));
cri.setMethodDispatcher(md);
OperationResourceInfo ori = JAXRSUtils.findTargetMethod(cri, null, "GET",
new MetadataMap<String, String>(), "*/*", getTypes("text/plain"), true);
assertSame(ori, ori2);
ori = JAXRSUtils.findTargetMethod(cri, null, "GET", new MetadataMap<String, String>(),