@Test public void parseLsub_withValidResponse_shouldReturnListResponse() throws Exception { List<ImapResponse> responses = singletonList(createImapResponse("* LSUB () \".\" \"Folder\"")); List<ListResponse> result = ListResponse.parseLsub(responses); assertEquals(1, result.size()); assertListResponseEquals(noAttributes(), ".", "Folder", result.get(0)); }
public static List<ListResponse> parseLsub(List<ImapResponse> responses) { return parse(responses, Responses.LSUB); }
ListResponse { public static List<ListResponse> parseLsub(List<ImapResponse> responses) { return parse(responses, Responses.LSUB); } }
ListResponse { public static List<ListResponse> parseLsub(List<ImapResponse> responses) { return parse(responses, Responses.LSUB); } private  ListResponse(List<String> attributes, String hierarchyDelimiter, String name); }
ListResponse { public static List<ListResponse> parseLsub(List<ImapResponse> responses) { return parse(responses, Responses.LSUB); } private  ListResponse(List<String> attributes, String hierarchyDelimiter, String name); static List<ListResponse> parseList(List<ImapResponse> responses); static List<ListResponse> parseLsub(List<ImapResponse> responses); List<String> getAttributes(); boolean hasAttribute(String attribute); @Nullable String getHierarchyDelimiter(); String getName(); }
ListResponse { public static List<ListResponse> parseLsub(List<ImapResponse> responses) { return parse(responses, Responses.LSUB); } private  ListResponse(List<String> attributes, String hierarchyDelimiter, String name); static List<ListResponse> parseList(List<ImapResponse> responses); static List<ListResponse> parseLsub(List<ImapResponse> responses); List<String> getAttributes(); boolean hasAttribute(String attribute); @Nullable String getHierarchyDelimiter(); String getName();  }