2 * ============LICENSE_START====================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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====================================================
22 package org.onap.aaf.auth.helpers.test;
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;
33 import static org.mockito.Mockito.*;
35 import java.nio.ByteBuffer;
36 import java.util.Date;
37 import java.util.UUID;
39 import org.junit.Test;
41 public class JU_Future {
50 UUID id = new UUID(0, 0);
53 future = new Future(id, "Re-Validate Ownership for AAF Namespace '\'test\'test","target",start, expires, bBuff);
57 public void testId() {
58 Assert.assertTrue(future.id() instanceof UUID);
62 public void testMemo() {
63 Assert.assertEquals("Re-Validate Ownership for AAF Namespace '\'test\'test", future.memo());
67 public void testStart() {
68 Assert.assertTrue(future.start() instanceof Date);
72 public void testExpires() {
73 Assert.assertTrue(future.expires() instanceof Date);
77 public void testTarget() {
78 Assert.assertEquals("target",future.target());
82 public void testExpunge() {
87 public void testCompareTo() {
88 future.compareTo(null);
89 future.compareTo(future);
93 public void testResetLocalData() {
94 future.resetLocalData();
98 public void testSizeForDeletion() {
99 System.out.println(future.sizeForDeletion());
103 public void testPendingDelete() {
104 System.out.println(future.pendingDelete(future));