@Test
public void testGetDescriptor() {

    final Repository mockRepository = mock(Repository.class);
    final String key = "SOME_KEY";
    final String value = "SOME_VALUE";
    when(mockRepository.getDescriptor(anyString())).thenReturn(null);
    when(mockRepository.getDescriptor(key)).thenReturn(value);
    final RepositoryFacade facade = getFacade(mockRepository);
    assertSame("should be same value",
            value, facade.getDescriptor(key));
    assertNull("should be null",
            facade.getDescriptor(""));
    final RepositoryFacade facadeNull = getFacade(null);
    assertNull("should be null for null",
            facadeNull.getDescriptor(key));
}