1 package org.onap.cps.ncmp.api.impl.utils.context
3 import com.fasterxml.jackson.databind.ObjectMapper
4 import org.onap.cps.utils.JsonObjectMapper
5 import org.springframework.boot.test.context.SpringBootTest
6 import org.springframework.test.context.ContextConfiguration
7 import spock.lang.Specification;
9 @SpringBootTest(classes = [ObjectMapper, JsonObjectMapper])
10 @ContextConfiguration(classes = [CpsApplicationContext.class])
11 class CpsApplicationContextSpec extends Specification {
13 def 'Verify if cps application context contains a requested bean.'() {
14 when: 'cps bean is requested from application context'
15 def jsonObjectMapper = CpsApplicationContext.getCpsBean(JsonObjectMapper.class)
16 then: 'requested bean of JsonObjectMapper is not null'
17 assert jsonObjectMapper != null