CreatePoolCommand extends OsgiCommandSupport { @VisibleForTesting void setId(String id) { this.id = checkNotNull(id, "id is null"); } CreatePoolCommand(List<Provisionr> services, List<PoolTemplate> templates);   }
@Test(expected = NoSuchElementException.class) public void testProvisioningServiceNotFound() throws Exception { CreatePoolCommand command = new CreatePoolCommand(Collections.<Provisionr>emptyList(), Collections.<PoolTemplate>emptyList()); command.setId("dummy"); CommandSession session = mock(CommandSession.class); command.execute(session); }