NetconfTopologyManager and UT mods/improvements
NetconfTopologyManagerTest:
- separated the test cases for successful and failed CSS registration
to make it easier to understand/follow.
- added additional scenarios/coverage/verification for DTCL
create/update/replace/delete notifications.
- removed the manipulation and direct verification of the
NetconfTopologyManager internal maps via reflection. These
are internal implementation details that the UTs shouldn't
have knowledge of. The maps are indirectly verified via
verification of the stored mocks.
- used the real DataBroker to verify the initilization of the
Topology nodes. This is easier than mocking a write trannsaction
correctly.
NetconfTopologyManager:
- changed the Maps to ConcurrentHashMap as they are accessed by
multiple threads and could even be accessed concurrently.
- added a hook for the UTs to create mock NetconfTopologyContexts
- if CSS registration fails, it should just close the NetconfTopologyContext
and not itself.
- other minor changes.
NetconfTopologyContext:
- implement AutoCloseable and rename closeFinal to the standard close.
- Renamed the AtomicBooleans for clarity.
Change-Id: Id095a4ff9395d68912a92b0b59d725e062ddd9fc
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>