The code here tries to read e1 and e2 as uris when these are strings. The method also does not throw if it gets to the warning even though the test is expecting one. Instead it ends up comparing two nulls and returning an NPE.
I assume that ServiceExposingBinding match(..) will always need an update first, which does not happen with init.await(). When I replacedinit.await() with this.update() and removed toTest.update() from the test setup, the only test that failed was conflictingExtensionsTest because the update() returns an NPE. If e1.uriand e2.uri are replaced with e1.toString() ande2.toString(), then the test still fails because of the fail "Should have thrown an exception upon update" expectation, that does not exist in the method.
I am not sure exactly why you introduce the Initializer interface for Runnable tasks, but this makes the whole thing rather difficult. How does this init method work? I do not get why you need to store the initializer interface in a private variable called init at all. Wouldn't it be clearer to use Runnable methods on instantiated tasks if you need to?
The code here tries to read
e1
ande2
as uris when these are strings. The method also does not throw if it gets to the warning even though the test is expecting one. Instead it ends up comparing two nulls and returning an NPE.I assume that
ServiceExposingBinding match(..)
will always need an update first, which does not happen withinit.await()
. When I replacedinit.await()
withthis.update()
and removedtoTest.update()
from the test setup, the only test that failed was conflictingExtensionsTest because the update() returns an NPE. Ife1.uri
ande2.uri
are replaced withe1.toString()
ande2.toString()
, then the test still fails because of the fail "Should have thrown an exception upon update" expectation, that does not exist in the method.I am not sure exactly why you introduce the
Initializer
interface for Runnable tasks, but this makes the whole thing rather difficult. How does this init method work? I do not get why you need to store the initializer interface in a private variable calledinit
at all. Wouldn't it be clearer to useRunnable
methods on instantiated tasks if you need to?