@Test
public void getAnExistingLicense(){

    final DbLicense license = new DbLicense();
    license.setName("test");
    license.setLongName("Grapes Test License");
    final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class);
    when(repositoryHandler.getLicense(license.getName())).thenReturn(license);
    final LicenseHandler handler = new LicenseHandler(repositoryHandler);
    final DbLicense gotLicense = handler.getLicense(license.getName());
    assertNotNull(gotLicense);
    assertEquals(license, gotLicense);
    verify(repositoryHandler, times(1)).getLicense(license.getName());
}