@Test
public void authorisedCidr() throws Exception {

  onramp.setAuthorities(singletonList("AUTHORIZED"));
  List<String> cidrBlocks = singletonList("0.0.0.0/0");
  onramp.setCidrBlocks(cidrBlocks);
  doReturn(false).when(authentication).isAuthenticated();
  doReturn(details).when(authentication).getDetails();
  String address = "0.0.0.0";
  doReturn(address).when(details).getRemoteAddress();
  doReturn(true).when(cidrBlockAuthorisation).isAuthorised(cidrBlocks, address);
  boolean result = underTest.isAuthorised(authentication, ROAD_NAME);
  assertThat(result, is(true));
  verify(metrics).increment("road1", ANONYMOUS, AUTHORISED);
}