Merge "Streamline outcome response for subscription creation"
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / impl / utils / context / CpsApplicationContextSpec.groovy
1 package org.onap.cps.ncmp.api.impl.utils.context
2
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;
8
9 @SpringBootTest(classes = [ObjectMapper, JsonObjectMapper])
10 @ContextConfiguration(classes = [CpsApplicationContext.class])
11 class CpsApplicationContextSpec extends Specification {
12
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
18     }
19 }