@Test
public void cidr_list_is_parsed_correctly() throws Exception {

  paverAuthorities.add("AUTHORIZED");
  cidrBlocks = "1.0.0.0/8,2.0.0.0/8";
  PaverAuthorisation underTest = new PaverAuthorisation(paverAuthorities, cidrBlocks, cidrBlockAuthorisation);
  doReturn(singletonList(new SimpleGrantedAuthority("FOO"))).when(authentication).getAuthorities();
  doReturn(details).when(authentication).getDetails();
  String address = "1.0.0.10";
  doReturn(address).when(details).getRemoteAddress();
  doReturn(true).when(cidrBlockAuthorisation).isAuthorised(asList("1.0.0.0/8", "2.0.0.0/8"), address);
  boolean result = underTest.isAuthorised(authentication);
  assertThat(result, is(true));
}