1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.beans.factory.parsing;
18
19 import org.junit.Test;
20
21 import static org.junit.Assert.*;
22
23
24
25
26
27 public final class NullSourceExtractorTests {
28
29 @Test
30 public void testPassThroughContract() throws Exception {
31 Object source = new Object();
32 Object extractedSource = new NullSourceExtractor().extractSource(source, null);
33 assertNull("The contract of NullSourceExtractor states that the extraction *always* return null", extractedSource);
34 }
35
36 @Test
37 public void testPassThroughContractEvenWithNull() throws Exception {
38 Object extractedSource = new NullSourceExtractor().extractSource(null, null);
39 assertNull("The contract of NullSourceExtractor states that the extraction *always* return null", extractedSource);
40 }
41
42 }