Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / auth / auth-batch / src / test / java / org / onap / aaf / auth / helpers / test / JU_Future.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
4  * ===========================================================================
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6  * ===========================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END====================================================
19  *
20  */
21
22 package org.onap.aaf.auth.helpers.test;
23
24 import static org.junit.Assert.*;
25 import org.junit.After;
26 import org.junit.Assert;
27 import org.junit.Before;
28 import org.junit.Test;
29 import org.mockito.Mock;
30 import org.mockito.Mockito;
31 import org.onap.aaf.auth.helpers.Future;
32
33 import static org.mockito.Mockito.*;
34
35 import java.nio.ByteBuffer;
36 import java.util.Date;
37 import java.util.UUID;
38
39 import org.junit.Test;
40
41 public class JU_Future {
42     
43     Future future;
44     Date start;
45     Date expires;
46     ByteBuffer bBuff;
47     
48     @Before
49     public void setUp() {
50         UUID id = new UUID(0, 0);
51         start = new Date();
52         expires = new Date();
53         future = new Future(id, "Re-Validate Ownership for AAF Namespace '\'test\'test","target",start, expires, bBuff);
54     }
55
56     @Test
57     public void testId() {
58         Assert.assertTrue(future.id() instanceof UUID);
59     }
60     
61     @Test
62     public void testMemo() {
63         Assert.assertEquals("Re-Validate Ownership for AAF Namespace '\'test\'test", future.memo());
64     }
65     
66     @Test
67     public void testStart() {
68         Assert.assertTrue(future.start() instanceof Date);
69     }
70     
71     @Test
72     public void testExpires() {
73         Assert.assertTrue(future.expires() instanceof Date);
74     }
75     
76     @Test
77     public void testTarget() {
78         Assert.assertEquals("target",future.target());
79     }
80     
81     @Test
82     public void testExpunge() {
83         future.expunge();
84     }
85     
86     @Test
87     public void testCompareTo() {
88         future.compareTo(null);
89         future.compareTo(future);
90     }
91     
92     @Test
93     public void testResetLocalData() {
94         future.resetLocalData();
95     }
96     
97     @Test
98     public void testSizeForDeletion() {
99         Assert.assertEquals(0, future.sizeForDeletion());
100     }
101     
102     @Test
103     public void testPendingDelete() {
104         Assert.assertEquals(false, future.pendingDelete(future));
105     }
106     
107
108 }