### Question:
NamespaceResponse { public static NamespaceResponse parse(List<ImapResponse> responses) { for (ImapResponse response : responses) { NamespaceResponse prefix = parse(response); if (prefix != null) { return prefix; } } return null; } private  NamespaceResponse(String prefix, String hierarchyDelimiter); static NamespaceResponse parse(List<ImapResponse> responses); String getPrefix(); String getHierarchyDelimiter();  }### Answer:
@Test public void parse_withoutNamespaceResponse_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* OK Some text here"); assertNull(result); }
@Test public void parse_withTooShortNamespaceResponse_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* NAMESPACE NIL NIL"); assertNull(result); }
@Test public void parse_withPersonalNamespacesNotPresent_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* NAMESPACE NIL NIL NIL"); assertNull(result); }
@Test public void parse_withEmptyListForPersonalNamespaces_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* NAMESPACE () NIL NIL"); assertNull(result); }
@Test public void parse_withEmptyListForFirstPersonalNamespace_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* NAMESPACE (()) NIL NIL"); assertNull(result); }
@Test public void parse_withIncompleteFirstPersonalNamespace_shouldReturnNull() throws Exception { NamespaceResponse result = parse("* NAMESPACE ((\"\")) NIL NIL"); assertNull(result); }
@Test public void parse_withEmptyResponseList() throws Exception { NamespaceResponse result = NamespaceResponse.parse(Collections.<ImapResponse>emptyList()); assertNull(result); }