@Test
public void testReadingServiceBindingAnnotation() {
try {
Class<?> classWithAnnotations = ClassUtil.forName(HelloWorldMockup.class.getName(), this.getClass());
AnnotationProcessor ap = new AnnotationProcessor();
BindingTemplate bindingTemplate = ap.parseServiceBinding(classWithAnnotations, "en", null, null);
assertNotNull(bindingTemplate);
//expecting references to two keys
assertEquals(2, bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().size());
assertEquals("tModelKey1",bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().get(0).getTModelKey());
//expecting two KeyedReferences in the CategoryBag
assertEquals(2, bindingTemplate.getCategoryBag().getKeyedReference().size());
KeyedReference keyedReference2 = bindingTemplate.getCategoryBag().getKeyedReference().get(1);
assertEquals("uddi-org:types:wsdl2",keyedReference2.getKeyName());
assertEquals("wsdlDeployment2",keyedReference2.getKeyValue());
assertEquals("uddi:uddi.org:categorization:types2",keyedReference2.getTModelKey());
} catch (Exception e) {
//we should not have any issues reading the annotations