/*
 * Copyright 2013 Séven Le Mesle Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
 * applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package fr.xebia.extras.selma.it.custom.mapper;

import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;

import org.junit.Test;

import fr.xebia.extras.selma.Selma;
import fr.xebia.extras.selma.it.utils.Compile;
import fr.xebia.extras.selma.it.utils.IntegrationTestBase;

@Compile(withClasses = CustomCdiSingletonMapperInMaps.class)
public class CustomCdiSingletonMapperInMapsIT extends IntegrationTestBase {
	
	@Test
	public void given_cdi_mapper_should_be_annotated_with_Inject_and_Singleton() {
		
		final CustomCdiMapperInMaps mapper = Selma.getMapper(CustomCdiMapperInMaps.class);
		assertThat(mapper.getClass().getAnnotation(javax.inject.Named.class), notNullValue());
		assertThat(mapper.getClass().getAnnotation(javax.inject.Singleton.class), notNullValue());
	}
}

@@ -1,10 +1,11 @@
 /*
+-
 %0A * Copy
@@ -15,16 +15,26 @@
 ht 2013 
+Xebia and 
 S%C3%A9ven Le
@@ -39,16 +39,22 @@
 Le Mesle
+%0A *%0A *
  License
@@ -109,16 +109,19 @@
 cense%22);
+%0A *
  you may
@@ -148,19 +148,16 @@
 xcept in
-%0A *
  complia
@@ -177,16 +177,19 @@
 License.
+%0A *
  You may
@@ -220,16 +220,26 @@
 cense at
+%0A *%0A *    
  http://
@@ -273,16 +273,22 @@
 ENSE-2.0
+%0A *%0A *
  Unless 
@@ -298,19 +298,16 @@
 uired by
-%0A *
  applica
@@ -347,16 +347,19 @@
 software
+%0A *
  distrib
@@ -416,16 +416,19 @@
 %22 BASIS,
+%0A *
  WITHOUT
@@ -441,19 +441,16 @@
 NTIES OR
-%0A *
  CONDITI
@@ -492,16 +492,19 @@
 implied.
+%0A *
  See the
@@ -563,16 +563,19 @@
 ions and
+%0A *
  limitat
@@ -584,19 +584,16 @@
 ns under
-%0A *
  the Lic
@@ -598,16 +598,19 @@
 icense.%0A
+ *%0A
  */%0Apack
@@ -1060,18 +1060,27 @@
 e %7B%0A
-%09%0A%09
+    %0A    
 @Test%0A
-%09
+    
 publ
@@ -1158,13 +1158,25 @@
 ) %7B%0A
-%09%09%0A%09%09
+        %0A        
 fina
@@ -1178,32 +1178,41 @@
  final CustomCdi
+Singleton
 MapperInMaps map
@@ -1242,16 +1242,25 @@
 ustomCdi
+Singleton
 MapperIn
@@ -1272,18 +1272,24 @@
 class);%0A
-%09%09
+        
 assertTh
@@ -1371,10 +1371,16 @@
 ));%0A
-%09%09
+        
 asse
@@ -1470,9 +1470,12 @@
 ));%0A
-%09
+    
 %7D%0A%7D%0A

Use of CustomCdiSingletonMapperInMaps instead of CustomCdiMapperInMaps