2425262728293031323334
@Override protected void onInstall() { $(Object.class); } }; module.onInstall(container); verify(container).getInstance(Object.class); } @Test public void shouldGetProviderFromContainer() {
36373839404142434445
@Override protected void onInstall() { $$(Object.class); } }; module.onInstall(container); verify(container).getProvider(Object.class); } }
130131132133134135136137138139140
// configure bootstrap bootstrapMock.reset(); bootstrap.init(null); bootstrapMock.setMatcher(MockControl.ALWAYS_MATCHER); bootstrap.onInstall(); bootstrap.getExtensionMBeanName(); bootstrapMock.setReturnValue(null); bootstrap.cleanUp(); bootstrapMock.replay(); // configure component
217218219220221222223224225226227
336337338339340341342343344345346
408409410411412413414415416417418
451452453454455456457458459460461
bootstrapMock.reset(); bootstrap.init(null); bootstrapMock.setMatcher(MockControl.ALWAYS_MATCHER); bootstrap.getExtensionMBeanName(); bootstrapMock.setReturnValue(null); bootstrap.onInstall(); bootstrap.cleanUp(); bootstrapMock.replay(); // configure component componentMock.reset(); componentMock.replay();