Buggy code:
public class MockIPSupport extends AbstractIpAddressSupport < MockCloud > implements IpAddressSupport { private static final TreeSet < String > allocatedIps = new TreeSet < String > ( ) ; private static final HashMap < String , Map < String , Map < String , Collection < String > > > > allocations = new HashMap < String , Map < String , Map < String , Collection < String > > > > ( ) ; private static final HashMap < String , String > vmAssignments = new HashMap < String , String > ( ) ; private static final HashMap < String , String > lbAssignments = new HashMap < String , String > ( ) ; private static int quad1 = 26 ; private static int quad2 = 0 ; private static int quad3 = 0 ; private static int quad4 = 0 ; private static final Random random = new Random ( ) ; @ Nonnull private static String allocate ( @ Nonnull ProviderContext ctx , IPVersion version ) throws CloudException { } public static void assignToVM ( @ Nonnull ProviderContext ctx , @ Nonnull String ipAddress , @ Nonnull VirtualMachine vm ) throws CloudException { } @ Nullable public static String getIPAddressForVM ( @ Nonnull String vmId ) { } @ Nullable public static String getIPAddressForLB ( @ Nonnull String lbId ) { } public MockIPSupport ( @ Nonnull MockCloud provider ) { } @ Override public void assign ( @ Nonnull String addressId , @ Nonnull String serverId ) throws CloudException , InternalException { } @ Override public void assignToNetworkInterface ( @ Nonnull String addressId , @ Nonnull String nicId ) throws CloudException , InternalException { } @ Override @ Nonnull public String forward ( @ Nonnull String addressId , int publicPort , @ Nonnull Protocol protocol , int privatePort , @ Nonnull String onServerId ) throws CloudException , InternalException { } @ Override public IpAddress getIpAddress ( @ Nonnull String addressId ) throws CloudException , InternalException { } @ Override public boolean isSubscribed ( ) throws CloudException , InternalException { } @ Override @ Nonnull public Iterable < IpAddress > listIpPool ( @ Nonnull IPVersion version , boolean unassignedOnly ) throws CloudException , InternalException { } @ Override @ Nonnull public Iterable < ResourceStatus > listIpPoolStatus ( @ Nonnull IPVersion version ) throws CloudException , InternalException { } @ Override @ Nonnull public Iterable < IpForwardingRule > listRules ( @ Nonnull String addressId ) throws CloudException , InternalException { } @ Override public void releaseFromPool ( @ Nonnull String ip ) throws CloudException , InternalException { } @ Override public void releaseFromServer ( @ Nonnull String ip ) throws CloudException , InternalException { } @ Override @ Nonnull public String request ( @ Nonnull IPVersion version ) throws CloudException , InternalException { } @ Override @ Nonnull public String requestForVLAN ( @ Nonnull IPVersion version ) throws CloudException , InternalException { } @ Override @ Nonnull public String requestForVLAN ( @ Nonnull IPVersion version , @ Nonnull String vlanId ) throws CloudException , InternalException { } @ Override public void stopForward ( @ Nonnull String ruleId ) throws CloudException , InternalException { } @ Override @ Nonnull public String [ ] mapServiceAction ( @ Nonnull ServiceAction action ) { } @ Nonnull @ Override public Future < Iterable < IpAddress > > listIpPoolConcurrently ( @ Nonnull IPVersion version , boolean unassignedOnly ) throws CloudException , InternalException { } @ Nonnull @ Override public IPAddressCapabilities getCapabilities ( ) throws CloudException , InternalException { <START_BUG> return new MockIPCapabilities ( getProvider ( ) ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return getProvider ( ) . getCapabilitiesFactory ( ) . getCapabilities ( MockIPCapabilities . class ) ;