public String getClusterNamespace() {
   Connection connection = getConnection();
   if (connection != null) {
     return connection.getClusterNamespace();
   }
   return ICommonAttributes.COMMON_NAMESPACE;
 }
  private IImageStream givenAnImageStreamTo(String namespace, DockerImageURI uri) {
    IImageStream is = mock(IImageStream.class);
    when(is.getNamespace()).thenReturn(namespace);
    when(is.getName()).thenReturn(IMAGE_STREAM_NAME);
    when(is.getDockerImageRepository()).thenReturn(uri);

    List<IResource> streams = Arrays.asList(is);

    Connection conn = mock(Connection.class);
    when(conn.getResources(anyString(), eq(namespace))).thenReturn(streams);
    when(conn.getClusterNamespace()).thenReturn(ICommonAttributes.COMMON_NAMESPACE);
    when(parameters.getConnection()).thenReturn(conn);
    return is;
  }