* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.mockito.Mockito.when;
import java.util.List;
+
+import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
when(sfMock.openSession()).thenReturn(mockSession);
when(mockSession.beginTransaction()).thenReturn(mockTransaction);
- doThrow(Exception.class).when(mockTransaction).commit();
- when(mockSession.close()).thenThrow(Exception.class);
+ doThrow(HibernateException.class).when(mockTransaction).commit();
+ when(mockSession.close()).thenThrow(HibernateException.class);
PolicyController.setjUnit(true);
}