services.keySet() );
if( 3 != services.size() )
{
final String message =
"Expected to get 3 services but got " + services.size();
throw new ServiceException( Service1.class.getName() + "{}",
message );
}
final Iterator iterator = services.keySet().iterator();
while( iterator.hasNext() )
{
final String key = (String)iterator.next();
final Service1 service1 = (Service1)services.get( key );
if( null == service1 )
{
final String message = "Expected non null service entry for " +
key;
throw new ServiceException( Service1[].class.getName(),
message );
}
}
}